@SuppressWarnings({"unchecked", "rawtypes"})
    public List<E> getValueAsList() {

        final Object fieldValue = getValue();
        final Class<?> fieldType = getType();

        if(Collection.class.isAssignableFrom(fieldType)) {
            final Collection<Object> value = (fieldValue == null ? new ArrayList<Object>() : (Collection<Object>) fieldValue);
            final List<Object> list = Utils.convertCollectionToList(value);
            return (List)list;

        } else if(fieldType.isArray()) {
            Class<?> componentType = fieldType.getComponentType();
            final List<Object> list = Utils.asList(fieldValue, componentType);
            return (List)list;

        } else {
            throw new IllegalStateException(MessageBuilder.create("validation.notSupportType")
                    .var("property", getFieldPath())
                    .varWithClass("type", fieldType)
                    .format());
        }

    }
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public List < E > getValueAsList ( ) { final Object fieldValue = getValue ( ) ; final Class < ? > fieldType = getType ( ) ; if ( Collection . class . isAssignableFrom ( fieldType ) ) { final Collection < Object > value = ( fieldValue == null ? new ArrayList < Object > ( ) : ( Collection < Object > ) fieldValue ) ; final List < Object > list = Utils . convertCollectionToList ( value ) ; return ( List ) list ; } else if ( fieldType . isArray ( ) ) { Class < ? > componentType = fieldType . getComponentType ( ) ; final List < Object > list = Utils . asList ( fieldValue , componentType ) ; return ( List ) list ; } else { throw new IllegalStateException ( MessageBuilder . create ( "validation.notSupportType" ) . var ( "property" , getFieldPath ( ) ) . varWithClass ( "type" , fieldType ) . format ( ) ) ; } }
フィールドの値をリストに変換して取得する。
@return