private Optional<PositionSetter> createField(final Class<?> beanClass, final String fieldName) {
        
        final String positionFieldName = fieldName + "Position";
        
        final Field positionField;
        try {
            positionField = beanClass.getDeclaredField(positionFieldName);
            positionField.setAccessible(true);
            
        } catch (NoSuchFieldException | SecurityException e) {
            return Optional.empty();
        }
        
        if(positionField.getType().equals(CellPosition.class)) {
            
            return Optional.of(new PositionSetter() {
                
                @Override
                public void set(final Object beanObj, final CellPosition position) {
                    ArgUtils.notNull(beanObj, "beanObj");
                    ArgUtils.notNull(position, "position");
                    
                    try {
                        positionField.set(beanObj, position);
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        throw new RuntimeException("fail access position field.", e);
                    }
                }
            });
            
        } else if(positionField.getType().equals(Point.class)) {
            
            return Optional.of(new PositionSetter() {
                
                @Override
                public void set(final Object beanObj, final CellPosition position) {
                    ArgUtils.notNull(beanObj, "beanObj");
                    ArgUtils.notNull(position, "position");
                    
                    try {
                        positionField.set(beanObj, position.toPoint());
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        throw new RuntimeException("fail access position field.", e);
                    }
                }
            });
            
        } else if(positionField.getType().equals(org.apache.poi.ss.util.CellAddress.class)) {
            
            return Optional.of(new PositionSetter() {
                
                @Override
                public void set(final Object beanObj, final CellPosition position) {
                    ArgUtils.notNull(beanObj, "beanObj");
                    ArgUtils.notNull(position, "position");
                    
                    try {
                        positionField.set(beanObj, position.toCellAddress());
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        throw new RuntimeException("fail access position field.", e);
                    }
                }
            });
        
        }
        
        return Optional.empty();
    }
private Optional < PositionSetter > createField ( final Class < ? > beanClass , final String fieldName ) { final String positionFieldName = fieldName + "Position" ; final Field positionField ; try { positionField = beanClass . getDeclaredField ( positionFieldName ) ; positionField . setAccessible ( true ) ; } catch ( NoSuchFieldException | SecurityException e ) { return Optional . empty ( ) ; } if ( positionField . getType ( ) . equals ( CellPosition . class ) ) { return Optional . of ( new PositionSetter ( ) { @ Override public void set ( final Object beanObj , final CellPosition position ) { ArgUtils . notNull ( beanObj , "beanObj" ) ; ArgUtils . notNull ( position , "position" ) ; try { positionField . set ( beanObj , position ) ; } catch ( IllegalArgumentException | IllegalAccessException e ) { throw new RuntimeException ( "fail access position field." , e ) ; } } } ) ; } else if ( positionField . getType ( ) . equals ( Point . class ) ) { return Optional . of ( new PositionSetter ( ) { @ Override public void set ( final Object beanObj , final CellPosition position ) { ArgUtils . notNull ( beanObj , "beanObj" ) ; ArgUtils . notNull ( position , "position" ) ; try { positionField . set ( beanObj , position . toPoint ( ) ) ; } catch ( IllegalArgumentException | IllegalAccessException e ) { throw new RuntimeException ( "fail access position field." , e ) ; } } } ) ; } else if ( positionField . getType ( ) . equals ( org . apache . poi . ss . util . CellAddress . class ) ) { return Optional . of ( new PositionSetter ( ) { @ Override public void set ( final Object beanObj , final CellPosition position ) { ArgUtils . notNull ( beanObj , "beanObj" ) ; ArgUtils . notNull ( position , "position" ) ; try { positionField . set ( beanObj , position . toCellAddress ( ) ) ; } catch ( IllegalArgumentException | IllegalAccessException e ) { throw new RuntimeException ( "fail access position field." , e ) ; } } } ) ; } return Optional . empty ( ) ; }
フィールドによる位置情報を格納する場合。
<p>{@code <フィールド名> + Position}のメソッド名</p>
<p>引数として、{@link CellPosition}、{@link Point}、 {@link org.apache.poi.ss.util.CellAddress}をサポートする。</p>

@param beanClass フィールドが定義してあるクラスのインスタンス
@param fieldName フィールド名
@return 位置情報の設定用クラス