private Optional<ArrayPositionSetter> 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(!List.class.isAssignableFrom(positionField.getType())) {
            return Optional.empty();
        }
        
        final ParameterizedType type = (ParameterizedType) positionField.getGenericType();
        final Class<?> valueType = (Class<?>) type.getActualTypeArguments()[0];
        
        if(valueType.equals(CellPosition.class)) {
            
            return Optional.of(new ArrayPositionSetter() {
                
                @SuppressWarnings("unchecked")
                @Override
                public void set(final Object beanObj, final CellPosition position, final int index) {
                    ArgUtils.notNull(beanObj, "beanObj");
                    ArgUtils.notNull(position, "position");
                    
                   try {
                       List<CellPosition> positionListObj = (List<CellPosition>) positionField.get(beanObj);
                       if(positionListObj == null) {
                           positionListObj = new ArrayList<>();
                           positionField.set(beanObj, positionListObj);
                       }
                       
                       Utils.addListWithIndex(positionListObj, position, index);
                       
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        throw new RuntimeException("fail access position field.", e);
                    }
                }
            });
            
        } else if(valueType.equals(Point.class)) {
            
            return Optional.of(new ArrayPositionSetter() {
                
                @SuppressWarnings("unchecked")
                @Override
                public void set(final Object beanObj, final CellPosition position, final int index) {
                    ArgUtils.notNull(beanObj, "beanObj");
                    ArgUtils.notNull(position, "position");
                    
                    try {
                        List<Point> positionListObj = (List<Point>) positionField.get(beanObj);
                        if(positionListObj == null) {
                            positionListObj = new ArrayList<>();
                            positionField.set(beanObj, positionListObj);
                        }
                        
                        
                        Utils.addListWithIndex(positionListObj, position.toPoint(), index);
                        
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        throw new RuntimeException("fail access position field.", e);
                    }
                }
            });
            
        } else if(valueType.equals(CellAddress.class)) {
            
            return Optional.of(new ArrayPositionSetter() {
                
                @SuppressWarnings("unchecked")
                @Override
                public void set(final Object beanObj, final CellPosition position, final int index) {
                    ArgUtils.notNull(beanObj, "beanObj");
                    ArgUtils.notNull(position, "position");
                    
                    try {
                        List<CellAddress> positionListObj = (List<CellAddress>) positionField.get(beanObj);
                        if(positionListObj == null) {
                            positionListObj = new ArrayList<>();
                            positionField.set(beanObj, positionListObj);
                        }
                        
                        Utils.addListWithIndex(positionListObj, position.toCellAddress(), index);
                        
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        throw new RuntimeException("fail access position field.", e);
                    }
                }
            });
        
        }
        
        return Optional.empty();
    }
private Optional < ArrayPositionSetter > 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 ( ! List . class . isAssignableFrom ( positionField . getType ( ) ) ) { return Optional . empty ( ) ; } final ParameterizedType type = ( ParameterizedType ) positionField . getGenericType ( ) ; final Class < ? > valueType = ( Class < ? > ) type . getActualTypeArguments ( ) [ 0 ] ; if ( valueType . equals ( CellPosition . class ) ) { return Optional . of ( new ArrayPositionSetter ( ) { @ SuppressWarnings ( "unchecked" ) @ Override public void set ( final Object beanObj , final CellPosition position , final int index ) { ArgUtils . notNull ( beanObj , "beanObj" ) ; ArgUtils . notNull ( position , "position" ) ; try { List < CellPosition > positionListObj = ( List < CellPosition > ) positionField . get ( beanObj ) ; if ( positionListObj == null ) { positionListObj = new ArrayList < > ( ) ; positionField . set ( beanObj , positionListObj ) ; } Utils . addListWithIndex ( positionListObj , position , index ) ; } catch ( IllegalArgumentException | IllegalAccessException e ) { throw new RuntimeException ( "fail access position field." , e ) ; } } } ) ; } else if ( valueType . equals ( Point . class ) ) { return Optional . of ( new ArrayPositionSetter ( ) { @ SuppressWarnings ( "unchecked" ) @ Override public void set ( final Object beanObj , final CellPosition position , final int index ) { ArgUtils . notNull ( beanObj , "beanObj" ) ; ArgUtils . notNull ( position , "position" ) ; try { List < Point > positionListObj = ( List < Point > ) positionField . get ( beanObj ) ; if ( positionListObj == null ) { positionListObj = new ArrayList < > ( ) ; positionField . set ( beanObj , positionListObj ) ; } Utils . addListWithIndex ( positionListObj , position . toPoint ( ) , index ) ; } catch ( IllegalArgumentException | IllegalAccessException e ) { throw new RuntimeException ( "fail access position field." , e ) ; } } } ) ; } else if ( valueType . equals ( CellAddress . class ) ) { return Optional . of ( new ArrayPositionSetter ( ) { @ SuppressWarnings ( "unchecked" ) @ Override public void set ( final Object beanObj , final CellPosition position , final int index ) { ArgUtils . notNull ( beanObj , "beanObj" ) ; ArgUtils . notNull ( position , "position" ) ; try { List < CellAddress > positionListObj = ( List < CellAddress > ) positionField . get ( beanObj ) ; if ( positionListObj == null ) { positionListObj = new ArrayList < > ( ) ; positionField . set ( beanObj , positionListObj ) ; } Utils . addListWithIndex ( positionListObj , position . toCellAddress ( ) , index ) ; } 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 CellAddress}をサポートする。</p>

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