public final class ClassUtils extends ClassUtils
BOOLEAN_ARRAY_CLASS, BOOLEAN_OBJECT_ARRAY_CLASS, BYTE_ARRAY_CLASS, BYTE_OBJECT_ARRAY_CLASS, CHAR_ARRAY_CLASS, CHARACTER_OBJECT_ARRAY_CLASS, COMMON_TYPES, DOUBLE_ARRAY_CLASS, DOUBLE_OBJECT_ARRAY_CLASS, EMPTY_STRING, FLOAT_ARRAY_CLASS, FLOAT_OBJECT_ARRAY_CLASS, INT_ARRAY_CLASS, INTEGER_OBJECT_ARRAY_CLASS, LONG_ARRAY_CLASS, LONG_OBJECT_ARRAY_CLASS, OBJECT_ARRAY_CLASS, PRIMITIVE_NAMES, PRIMITIVES, SHORT_ARRAY_CLASS, SHORT_OBJECT_ARRAY_CLASS, STRING_OBJECT_ARRAY_CLASS
Constructor and Description |
---|
ClassUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
buildApplicationObject(Class<T> interfaceClass,
Class<? extends T> extendedInterfaceClass,
Class<? extends T> extendedInterfaceWrapperClass,
Collection<String> classNamesIterator,
T defaultObject)
Creates ApplicationObjects like NavigationHandler or StateManager and creates
the right wrapping chain of the ApplicationObjects known as the decorator pattern.
|
static <T> T |
buildApplicationObject(Class<T> interfaceClass,
Collection<String> classNamesIterator,
T defaultObject)
Creates ApplicationObjects like NavigationHandler or StateManager and creates
the right wrapping chain of the ApplicationObjects known as the decorator pattern.
|
protected static String |
paramString(Class<?>... types) |
static <T> T |
wrapBackwardCompatible(Class<T> interfaceClass,
Class<? extends T> extendedInterfaceClass,
Class<? extends T> extendedInterfaceWrapperClass,
T defaultObject,
T newCurrent)
Wrap an object using a backwards compatible wrapper if available
|
classForName, convertToType, convertToTypeNoLogging, forName, forNamePrimitive, getContextClassLoader, getCurrentLoader, getCurrentLoader, getResource, getResourceAsStream, getResources, javaDefaultTypeToClass, javaTypeToClass, newInstance, newInstance, newInstance, newInstance, newInstance, simpleClassForName, simpleClassForName, simpleJavaTypeToClass, toTypeArray, toTypeNameArray
public static <T> T buildApplicationObject(Class<T> interfaceClass, Collection<String> classNamesIterator, T defaultObject)
T
- interfaceClass
- The class from which the implementation has to inherit from.classNamesIterator
- All the class names of the actual ApplicationObject implementations
from the faces-config.xml.defaultObject
- The default implementation for the given ApplicationObject.public static <T> T buildApplicationObject(Class<T> interfaceClass, Class<? extends T> extendedInterfaceClass, Class<? extends T> extendedInterfaceWrapperClass, Collection<String> classNamesIterator, T defaultObject)
T
- interfaceClass
- The class from which the implementation has to inherit from.extendedInterfaceClass
- A subclass of interfaceClass which specifies a more
detailed implementation.extendedInterfaceWrapperClass
- A wrapper class for the case that you have an ApplicationObject
which only implements the interfaceClass but not the
extendedInterfaceClass.classNamesIterator
- All the class names of the actual ApplicationObject implementations
from the faces-config.xml.defaultObject
- The default implementation for the given ApplicationObject.public static <T> T wrapBackwardCompatible(Class<T> interfaceClass, Class<? extends T> extendedInterfaceClass, Class<? extends T> extendedInterfaceWrapperClass, T defaultObject, T newCurrent)
interfaceClass
- The class from which the implementation has to inherit from.extendedInterfaceClass
- A subclass of interfaceClass which specifies a more
detailed implementation.extendedInterfaceWrapperClass
- A wrapper class for the case that you have an ApplicationObject
which only implements the interfaceClass but not the
extendedInterfaceClass.defaultObject
- The default implementation for the given ApplicationObject.newCurrent
- The new current objectCopyright © 2022 The Apache Software Foundation. All rights reserved.