Package org.apache.juneau.internal
Class ClassUtils
java.lang.Object
org.apache.juneau.internal.ClassUtils
Class-related utility methods.
 
See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringReturns the fully-qualified class name for the specified object.static Class<?>[]getClasses(Object... args) Returns the class types for the specified arguments.static Object[]getMatchingArgs(Class<?>[] paramTypes, Object... args) Matches arguments to a list of parameter types.static booleanstatic booleanstatic booleansetAccessible(Constructor<?> x) Attempts to callx.setAccessible(and quietly ignores security exceptions.true )static booleanAttempts to callx.setAccessible(and quietly ignores security exceptions.true )static booleanAttempts to callx.setAccessible(and quietly ignores security exceptions.true )static StringsimpleClassName(Object value) Returns the simple class name for the specified object.static Class<?>Returns the specified type as aClass .
- 
Field Details- 
NOT_VOIDPredicate check to filter out void classes.
 
- 
- 
Constructor Details- 
ClassUtilspublic ClassUtils()
 
- 
- 
Method Details- 
getClassesReturns the class types for the specified arguments.- Parameters:
- args- The objects we're getting the classes of.
- Returns:
- The classes of the arguments.
 
- 
getMatchingArgsMatches arguments to a list of parameter types.Extra parameters are ignored. 
 Missing parameters are left null.- Parameters:
- paramTypes- The parameter types.
- args- The arguments to match to the parameter types.
- Returns:
- An array of parameters.
 
- 
setAccessibleAttempts to callx.setAccessible(and quietly ignores security exceptions.true )- Parameters:
- x- The constructor.
- Returns:
- true if call was successful.
 
- 
setAccessibleAttempts to callx.setAccessible(and quietly ignores security exceptions.true )- Parameters:
- x- The method.
- Returns:
- true if call was successful.
 
- 
setAccessibleAttempts to callx.setAccessible(and quietly ignores security exceptions.true )- Parameters:
- x- The field.
- Returns:
- true if call was successful.
 
- 
toClassReturns the specified type as aClass .If it's already a Class , it just does a cast.
 If it's aParameterizedType , it returns the raw type.- Parameters:
- t- The type to convert.
- Returns:
- The type converted to a Class , ornull if it could not be converted.
 
- 
classNameReturns the fully-qualified class name for the specified object.- Parameters:
- value- The object to get the class name for.
- Returns:
- The name of the class or null if the value was null.
 
- 
simpleClassNameReturns the simple class name for the specified object.- Parameters:
- value- The object to get the class name for.
- Returns:
- The name of the class or null if the value was null.
 
- 
isVoid- Parameters:
- c- The class to check.
- Returns:
- true if the specific class is- null or- void .- class - Voidor has the simple name- "Void .
 
- 
isNotVoid- Parameters:
- c- The class to check.
- Returns:
- false if the specific class is- null or- void .- class - Voidor has the simple name- "Void .
 
 
-