public final class ClassUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Field[] |
collectDeclaredFields(Class<?> c)
Produces an array with all the fields of the specified class
|
static Field[] |
collectDeclaredInstanceFields(Class<?> c)
Produces an array with all the instance fields of the specified class
|
static Method[] |
collectDeclaredMethods(Class<?> c)
Produces an array with all the methods of the specified class
|
static Field[] |
collectFields(Class<?> c)
Produces an array with all the fields of the specified class
|
static Field[] |
collectFields(Class<?> c,
Class<?> limitExclusive)
Produces an array with all the fields of the specified class
|
static Field[] |
collectFields(Class<?> c,
int inclusiveModifiers,
int exclusiveModifiers)
Produces an array with all the instance fields of the specified class which match the supplied rules
|
static Field[] |
collectFields(Class<?> c,
int inclusiveModifiers,
int exclusiveModifiers,
Class<?> limitExclusive)
Produces an array with all the instance fields of the specified class which match the supplied rules
|
static Field[] |
collectInstanceFields(Class<?> c)
Produces an array with all the instance fields of the specified class
|
static Field[] |
collectInstanceFields(Class<?> c,
boolean excludePublic,
boolean excludeProtected,
boolean excludePrivate)
Produces an array with all the instance fields of the specified class which match the supplied rules
|
static Field[] |
collectInstanceFields(Class<?> c,
Class<?> limitExclusive)
Produces an array with all the instance fields of the specified class
|
static Method[] |
collectMethods(Class<?> c)
Produces an array with all the methods of the specified class
|
static Method[] |
collectMethods(Class<?> c,
Class<?> limitExclusive)
Produces an array with all the methods of the specified class
|
static Method[] |
collectMethods(Class<?> c,
int inclusiveModifiers,
int exclusiveModifiers)
Produces an array with all the methods of the specified class
|
static Method[] |
collectMethods(Class<?> c,
int inclusiveModifiers,
int exclusiveModifiers,
Class<?> limitExclusive)
Produces an array with all the methods of the specified class
|
static boolean |
isJdkImmutable(Class<?> type)
Indicate if the class is a known non-primitive, JDK immutable type
|
static boolean |
isWrapper(Class<?> type)
Indicate if the class is a known primitive wrapper type
|
public static boolean isJdkImmutable(Class<?> type)
type
- Class to testpublic static boolean isWrapper(Class<?> type)
type
- Class to testpublic static Field[] collectDeclaredInstanceFields(Class<?> c)
c
- The class specifiedpublic static Field[] collectInstanceFields(Class<?> c)
c
- The class specifiedpublic static Field[] collectInstanceFields(Class<?> c, Class<?> limitExclusive)
c
- The class specifiedlimitExclusive
- Fields from this class or higher in the hierarchy will not be returnedpublic static Field[] collectInstanceFields(Class<?> c, boolean excludePublic, boolean excludeProtected, boolean excludePrivate)
c
- The class specifiedexcludePublic
- Exclude public fields if trueexcludeProtected
- Exclude protected fields if trueexcludePrivate
- Exclude private fields if truepublic static Field[] collectDeclaredFields(Class<?> c)
c
- The class specifiedpublic static Field[] collectFields(Class<?> c)
c
- The class specifiedpublic static Field[] collectFields(Class<?> c, Class<?> limitExclusive)
c
- The class specifiedlimitExclusive
- Fields from this class or higher in the hierarchy will not be returnedpublic static Field[] collectFields(Class<?> c, int inclusiveModifiers, int exclusiveModifiers)
public static Field[] collectFields(Class<?> c, int inclusiveModifiers, int exclusiveModifiers, Class<?> limitExclusive)
c
- The class specifiedinclusiveModifiers
- An int indicating the Modifier
s that may be appliedexclusiveModifiers
- An int indicating the Modifier
s that must be excludedlimitExclusive
- Fields from this class or higher in the hierarchy will not be returnedpublic static Method[] collectDeclaredMethods(Class<?> c)
c
- The class specifiedpublic static Method[] collectMethods(Class<?> c)
c
- The class specifiedpublic static Method[] collectMethods(Class<?> c, Class<?> limitExclusive)
c
- The class specifiedlimitExclusive
- Methods from this class or higher in the hierarchy will not be returnedpublic static Method[] collectMethods(Class<?> c, int inclusiveModifiers, int exclusiveModifiers)
public static Method[] collectMethods(Class<?> c, int inclusiveModifiers, int exclusiveModifiers, Class<?> limitExclusive)
c
- The class specifiedinclusiveModifiers
- An int indicating the Modifier
s that may be appliedexclusiveModifiers
- An int indicating the Modifier
s that must be excludedlimitExclusive
- Methods from this class or higher in the hierarchy will not be returnedCopyright © 2010–2018 Jadira Systems. All rights reserved.