private Object asList ( Object value ) { Class < ? > componentClass = value . getClass ( ) . getComponentType ( ) ; if ( componentClass . isPrimitive ( ) ) { if ( componentClass . equals ( int . class ) ) { return asIntList ( value ) ; } else if ( componentClass . equals ( long . class ) ) { return asLongList ( value ) ; } else if ( componentClass . equals ( boolean . class ) ) { return asBooleanList ( value ) ; } else if ( componentClass . equals ( short . class ) ) { return asShortList ( value ) ; } else if ( componentClass . equals ( byte . class ) ) { return asByteList ( value ) ; } else { return asCharList ( value ) ; } } else { return asList ( value , componentClass ) ; } }
Returns the array value as a List .