/** * A simple but efficient method for getting the interfaces for a class type, * this has some shortcuts for the common types like maps, lists, etc.<br/> * Only returns the interfaces for the current type and not for all nested types * * @param type any class type * @return the list of interfaces (empty if none) */ public static List<Class<?>> getInterfacesForClass(Class<?> type) { ArrayList<Class<?>> interfaces = new ArrayList<Class<?>>(); // find the actual interfaces from the class itself for (Class<?> iface : type.getInterfaces()) { interfaces.add(iface); } // add in the collection interface if this is a collection if ( isClassCollection(type) ) { if ( isClassList(type) ) { interfaces.add(List.class); } else if ( Set.class.isAssignableFrom(type)) { interfaces.add(Set.class); } interfaces.add(Collection.class); } else if ( isClassMap(type) ) { interfaces.add(Map.class); } return interfaces; }
/** * A simple but efficient method for getting the interfaces for a class type, * this has some shortcuts for the common types like maps, lists, etc.<br/> * Only returns the interfaces for the current type and not for all nested types * * @param type any class type * @return the list of interfaces (empty if none) */ public static List<Class<?>> getInterfacesForClass(Class<?> type) { ArrayList<Class<?>> interfaces = new ArrayList<Class<?>>(); // find the actual interfaces from the class itself for (Class<?> iface : type.getInterfaces()) { interfaces.add(iface); } // add in the collection interface if this is a collection if ( isClassCollection(type) ) { if ( isClassList(type) ) { interfaces.add(List.class); } else if ( Set.class.isAssignableFrom(type)) { interfaces.add(Set.class); } interfaces.add(Collection.class); } else if ( isClassMap(type) ) { interfaces.add(Map.class); } return interfaces; }
convert.add( aVal ); } else if ( ConstructorUtils.isClassCollection(fromType) ) {
} else if ( isClassMap(type) ) { toType = (Class<T>) ArrayOrderedMap.class; } else if ( isClassCollection(type) ) { toType = (Class<T>) Vector.class;
} else if ( isClassMap(type) ) { toType = (Class<T>) ArrayOrderedMap.class; } else if ( isClassCollection(type) ) { toType = (Class<T>) Vector.class;
convert.add( aVal ); } else if ( ConstructorUtils.isClassCollection(fromType) ) {
/** * @param type any class * @return true if this is a collection, map, or array, * something that holds a bunch of objects (e.g. {@link Map}, {@link Set}, {@link List}, array) */ public static boolean isClassObjectHolder(Class<?> type) { checkNull(type); boolean holder = false; if ( isClassArray(type) || isClassCollection(type) || isClassMap(type) ) { holder = true; } return holder; }
/** * @param type any class * @return true if this is a collection, map, or array, * something that holds a bunch of objects (e.g. {@link Map}, {@link Set}, {@link List}, array) */ public static boolean isClassObjectHolder(Class<?> type) { checkNull(type); boolean holder = false; if ( isClassArray(type) || isClassCollection(type) || isClassMap(type) ) { holder = true; } return holder; }
convert.put(i+"", aVal); } else if ( ConstructorUtils.isClassCollection(fromType) ) {
convert.put(i+"", aVal); } else if ( ConstructorUtils.isClassCollection(fromType) ) {
} else if ( ConstructorUtils.isClassCollection(fromType) ) {
} else if ( ConstructorUtils.isClassCollection(fromType) ) {
} else if ( ConstructorUtils.isClassCollection(fromType) ) {
m.put(key, value); } else if ( ConstructorUtils.isClassCollection(type)) { Collection collection = ((Collection)container.getContainer()); collection.add(value);
m.put(key, value); } else if ( ConstructorUtils.isClassCollection(type)) { Collection collection = ((Collection)container.getContainer()); collection.add(value);
} else if ( ConstructorUtils.isClassCollection(type) ) {
} else if ( ConstructorUtils.isClassCollection(fromType) ) {
} else if ( ConstructorUtils.isClassCollection(type) ) {
sb.append("</td></tr>"); makeEOL(sb, humanOutput); } else if ( ConstructorUtils.isClassCollection(type) ) {
sb.append("</td></tr>"); makeEOL(sb, humanOutput); } else if ( ConstructorUtils.isClassCollection(type) ) {