public class IntrospectionUtils
extends java.lang.Object
Constructor and Description |
---|
IntrospectionUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addGenericTypes(java.lang.StringBuffer sb,
java.lang.reflect.TypeVariable<?>[] tp)
Adds the type variable generic declaration (i. e.
|
static java.lang.String |
argumentTypesToString(java.lang.Class<?>[] argTypes)
Pretty prints argument types
|
static Class<?>[] |
decorateClassList(java.lang.Class<?>[] classList)
Decorates a list of java.lang.Class objects.
|
static Constructor<?>[] |
decorateConstructorList(java.lang.reflect.Constructor<?>[] methodList)
Decorates a list of java.lang.reflect.Constructor
|
static Field[] |
decorateFieldList(java.lang.reflect.Field[] fieldList)
Decorates a list of java.lang.reflect.Field objects.
|
static Method[] |
decorateMethodList(java.lang.reflect.Method[] methodList)
Decorates a list of java.lang.reflect.Method objects.
|
static java.lang.annotation.Annotation[] |
filterJMPLibAnnotations(java.lang.annotation.Annotation[] interfs)
Removes from the passed interface list those interfaces that are added by
JMPLib, to avoid reflection users to see the inner workings of our library.
|
static Field[] |
filterJMPLibFields(Field[] fields)
Removes from the passed field list those fields that are added by JMPLib, to
avoid reflection users to see the inner workings of our library.
|
static java.lang.reflect.Field[] |
filterJMPLibFields(java.lang.reflect.Field[] fields) |
static Class[] |
filterJMPLibInterfaces(Class[] interfs)
Removes from the passed annotation list those ones that are added by JMPLib,
to avoid reflection users to see the inner workings of our library.
|
static Method[] |
filterJMPLibMethods(Method[] methods)
Removes from the passed method list those methods that are added by JMPLib,
to avoid reflection users to see the inner workings of our library.
|
static java.lang.reflect.Method[] |
filterJMPLibMethods(java.lang.reflect.Method[] methods) |
static java.lang.Object |
getLatestObjectVersion(java.lang.Object obj)
Helper method to get an instance of the latest class version of a certain
Object.
|
static boolean |
isJmpLibAddedAnnotation(java.lang.annotation.Annotation n)
Determines if this annotation is an annotation added by JMPLib
|
static boolean |
isJmpLibAddedField(Field m)
Determines if this field is a field added by JMPLib
|
static boolean |
isJmpLibAddedField(java.lang.reflect.Field m) |
static boolean |
isJmpLibAddedInterface(Class<?> c)
Determines if this method is a method added by JMPLib
|
static boolean |
isJmpLibAddedMethod(Method m)
Determines if this method is a method added by JMPLib
|
static boolean |
isJmpLibAddedMethod(java.lang.reflect.Method m) |
static boolean |
isJmpLibInvokerOrCreator(Method m,
Method[] methodList)
Tests if a method is a JMPLib invoker or creator
|
static boolean |
isJmpLibInvokerOrCreator(java.lang.reflect.Method m,
java.lang.reflect.Method[] methodList) |
static boolean |
isJmpLibMethod(Method m,
java.lang.reflect.Method[] methodList) |
static boolean |
isJmpLibMethod(Method m,
Method[] methodList) |
static boolean |
isJmpLibMethod(java.lang.reflect.Method m,
java.lang.reflect.Method[] methodList) |
static java.lang.Class<?>[] |
undecorateClassList(Class<?>[] classList)
Eliminates the decorator of list of jmplib.reflect.Class objects.
|
public static final boolean isJmpLibAddedAnnotation(java.lang.annotation.Annotation n)
m
- public static final boolean isJmpLibAddedMethod(Method m)
m
- public static final boolean isJmpLibAddedInterface(Class<?> c)
m
- public static final boolean isJmpLibAddedMethod(java.lang.reflect.Method m)
public static final boolean isJmpLibAddedField(Field m)
m
- public static final boolean isJmpLibAddedField(java.lang.reflect.Field m)
public static final boolean isJmpLibInvokerOrCreator(Method m, Method[] methodList)
m
- methodList
- public static final boolean isJmpLibInvokerOrCreator(java.lang.reflect.Method m, java.lang.reflect.Method[] methodList)
public static final boolean isJmpLibMethod(Method m, java.lang.reflect.Method[] methodList)
m
- methodList
- public static final boolean isJmpLibMethod(Method m, Method[] methodList)
m
- methodList
- public static final boolean isJmpLibMethod(java.lang.reflect.Method m, java.lang.reflect.Method[] methodList)
public static final Method[] filterJMPLibMethods(Method[] methods)
methods
- public static final java.lang.reflect.Method[] filterJMPLibMethods(java.lang.reflect.Method[] methods)
public static final Field[] filterJMPLibFields(Field[] fields)
fields
- Array of fields to filterpublic static final java.lang.reflect.Field[] filterJMPLibFields(java.lang.reflect.Field[] fields)
public static final java.lang.annotation.Annotation[] filterJMPLibAnnotations(java.lang.annotation.Annotation[] interfs)
interfs
- public static final Class[] filterJMPLibInterfaces(Class[] interfs)
interfs
- public static final Constructor<?>[] decorateConstructorList(java.lang.reflect.Constructor<?>[] methodList)
methodList
- public static final Method[] decorateMethodList(java.lang.reflect.Method[] methodList)
methodList
- public static final Field[] decorateFieldList(java.lang.reflect.Field[] fieldList)
fieldList
- public static final Class<?>[] decorateClassList(java.lang.Class<?>[] classList)
classList
- public static final java.lang.Class<?>[] undecorateClassList(Class<?>[] classList)
classList
- public static final java.lang.String argumentTypesToString(java.lang.Class<?>[] argTypes)
argTypes
- public static final java.lang.Object getLatestObjectVersion(java.lang.Object obj) throws java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
obj
- java.lang.NoSuchMethodException
java.lang.SecurityException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchFieldException
public static final void addGenericTypes(java.lang.StringBuffer sb, java.lang.reflect.TypeVariable<?>[] tp)
sb
- tp
-