com.espertech.esper.util
Class JavaClassHelper

java.lang.Object
  extended by com.espertech.esper.util.JavaClassHelper

public class JavaClassHelper
extends java.lang.Object

Helper for questions about Java classes such as

what is the boxed type for a primitive type

is this a numeric type.


Constructor Summary
JavaClassHelper()
           
 
Method Summary
static boolean canCoerce(java.lang.Class numberClassToBeCoerced, java.lang.Class numberClassToCoerceTo)
          Determines if a number can be coerced upwards to another number class without loss.
static java.lang.Number coerceBoxed(java.lang.Number numToCoerce, java.lang.Class resultBoxedType)
          Coerce the given number to the given type, assuming the type is a Boxed type.
static java.util.Set<java.lang.reflect.Field> findAnnotatedFields(java.lang.Class targetClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
           
static java.util.Set<java.lang.reflect.Method> findAnnotatedMethods(java.lang.Class targetClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
           
static java.util.List<java.lang.reflect.Method> findMethodsByNameStartsWith(java.lang.Class clazz, java.lang.String methodName)
           
static java.lang.reflect.Method findRequiredMethod(java.lang.Class clazz, java.lang.String methodName)
           
static java.lang.Object getAnnotationHook(java.lang.annotation.Annotation[] annotations, HookType hookType, java.lang.Class interfaceExpected, MethodResolutionService resolution)
          Returns an instance of a hook as specified by an annotation.
static java.util.List<java.lang.annotation.Annotation> getAnnotations(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass, java.lang.annotation.Annotation[] annotations)
           
static java.lang.Class getArithmaticCoercionType(java.lang.Class typeOne, java.lang.Class typeTwo)
          Returns the coercion type for the 2 numeric types for use in arithmatic.
static java.lang.Class getArrayType(java.lang.Class resultType)
           
static java.lang.String getBoxedClassName(java.lang.String className)
          Returns for the class name given the class name of the boxed (wrapped) type if the class name is one of the Java primitive types.
static java.lang.Class getBoxedType(java.lang.Class clazz)
          Returns the boxed class for the given class, or the class itself if already boxed or not a primitive type.
static java.lang.Class getClassForName(java.lang.String className)
          Returns the class given a fully-qualified class name.
static java.lang.Class getClassForSimpleName(java.lang.String className)
          Returns the boxed class for the given classname, recognizing all primitive and abbreviations, uppercase and lowercase.
static java.lang.Class getClassInClasspath(java.lang.String classname)
           
static java.lang.String getClassLoaderId(java.lang.ClassLoader classLoader)
           
static java.lang.String getClassNameFullyQualPretty(java.lang.Class clazz)
           
static java.lang.String getClassNameFullyQualPrettyWithClassloader(java.lang.Class clazz)
           
static java.util.Map<java.lang.String,java.lang.Object> getClassObjectFromPropertyTypeNames(java.util.Properties properties)
           
static java.lang.Class getCommonCoercionType(java.lang.Class[] types)
          Determines a common denominator type to which one or more types can be casted or coerced.
static java.lang.Class getCompareToCoercionType(java.lang.Class typeOne, java.lang.Class typeTwo)
          Returns for 2 classes to be compared via relational operator the Class type of common comparison.
static java.lang.Class getGenericFieldType(java.lang.reflect.Field field, boolean isAllowNull)
          Returns the generic type parameter of a return value by a field.
static java.lang.Class getGenericFieldTypeMap(java.lang.reflect.Field field, boolean isAllowNull)
          Returns the generic type parameter of a return value by a field or method.
static java.lang.Class getGenericReturnType(java.lang.reflect.Method method, boolean isAllowNull)
          Returns the generic type parameter of a return value by a method.
static java.lang.Class getGenericReturnType(java.lang.reflect.Method method, java.lang.reflect.Field field, boolean isAllowNull)
          Returns the generic type parameter of a return value by a field or method.
static java.lang.Class getGenericReturnTypeMap(java.lang.reflect.Method method, boolean isAllowNull)
          Returns the second generic type parameter of a return value by a field or method.
static java.lang.Class getGenericReturnTypeMap(java.lang.reflect.Method method, java.lang.reflect.Field field, boolean isAllowNull)
          Returns the second generic type parameter of a return value by a field or method.
static java.lang.Class getGenericType(java.lang.reflect.Type t, int index)
           
static java.lang.String getMessageInvocationTarget(java.lang.String statementName, java.lang.reflect.Method method, java.lang.String classOrPropertyName, java.lang.Object[] args, java.lang.reflect.InvocationTargetException e)
           
static java.lang.reflect.Method getMethodByName(java.lang.Class clazz, java.lang.String methodName)
           
static java.lang.String getParameterAsString(java.lang.Class param)
          Returns a parameter as a string text, allowing null values to represent a null select expression type.
static java.lang.String getParameterAsString(java.lang.Class[] parameters)
          Returns a comma-separated parameter type list in readable form, considering arrays and null-type parameters.
static java.lang.Class getPrimitiveClassForName(java.lang.String typeName)
          Returns the class for a Java primitive type name, ignoring case, and considering String as a primitive.
static java.lang.Class getPrimitiveType(java.lang.Class clazz)
          Returns the un-boxed class for the given class, or the class itself if already un-boxed or not a primitive type.
static java.lang.String getSimpleNameForClass(java.lang.Class clazz)
           
static void getSuper(java.lang.Class clazz, java.util.Set<java.lang.Class> result)
          Populates all interface and superclasses for the given class, recursivly.
static java.lang.Class[] getSuperInterfaces(java.lang.Class clazz)
           
static void getSuperInterfaces(java.lang.Class clazz, java.util.Set<java.lang.Class> result)
           
static java.lang.Object instantiate(java.lang.Class implementedOrExtendedClass, java.lang.String className)
          Looks up the given class and checks that it implements or extends the required interface, and instantiates an object.
static boolean isAnnotationListed(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass, java.lang.annotation.Annotation[] annotations)
           
static boolean isAssignmentCompatible(java.lang.Class invocationType, java.lang.Class declarationType)
          Returns true if 2 classes are assignment compatible.
static boolean isBigNumberType(java.lang.Class clazz)
          Returns true if the type is one of the big number types, i.e.
static boolean isBoolean(java.lang.Class clazz)
          Determines if the class passed in is a boolean boxed or unboxed type.
static boolean isDatetimeClass(java.lang.Class inputType)
           
static boolean isFloatingPointClass(java.lang.Class clazz)
          Returns true if the supplied type is a floating point number.
static boolean isFloatingPointNumber(java.lang.Number number)
          Returns true if the Number instance is a floating point number.
static boolean isFragmentableType(java.lang.Class propertyType)
          Returns true if the Class is a fragmentable type, i.e.
static Pair<java.lang.String,java.lang.Boolean> isGetArrayType(java.lang.String type)
           
static boolean isImplementsInterface(java.lang.Class clazz, java.lang.Class interfaceClass)
          Method to check if a given class, and its superclasses and interfaces (deep), implement a given interface.
static boolean isJavaBuiltinDataType(java.lang.Class clazz)
          Returns true if the class passed in is a Java built-in data type (primitive or wrapper) including String and 'null'.
static boolean isNumeric(java.lang.Class clazz)
          Determines if the class passed in is one of the numeric classes.
static boolean isNumericNonFP(java.lang.Class clazz)
          Determines if the class passed in is one of the numeric classes and not a floating point.
static boolean isSignatureCompatible(java.lang.Class<?>[] one, java.lang.Class<?>[] two)
           
static boolean isSimpleNameFullyQualfied(java.lang.String simpleClassName, java.lang.String fullyQualifiedClassname)
          Returns true if the simple class name is the class name of the fully qualified classname.
static boolean isSubclassOrImplementsInterface(java.lang.Class extendorOrImplementor, java.lang.Class extendedOrImplemented)
          Method to check if a given class, and its superclasses and interfaces (deep), implement a given interface or extend a given class.
static java.lang.Object parse(java.lang.Class clazz, java.lang.String text)
          Parse the String using the given Java built-in class for parsing.
static java.lang.String printInstance(java.lang.Object instance, boolean fullyQualified)
           
static java.lang.Object resolveIdentAsEnumConst(java.lang.String constant, MethodResolutionService methodResolutionService, EngineImportService engineImportService)
          Resolve a string constant as a possible enumeration value, returning null if not resolved.
static void setFieldForAnnotation(java.lang.Object target, java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Object value)
           
static void writeInstance(java.io.StringWriter writer, java.lang.Object instance, boolean fullyQualified)
           
static void writeInstance(java.io.StringWriter writer, java.lang.String title, java.lang.Object instance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaClassHelper

public JavaClassHelper()
Method Detail

getBoxedType

public static java.lang.Class getBoxedType(java.lang.Class clazz)
Returns the boxed class for the given class, or the class itself if already boxed or not a primitive type. For primitive unboxed types returns the boxed types, e.g. returns java.lang.Integer for passing int.class. For any other class, returns the class passed.

Parameters:
clazz - is the class to return the boxed class for
Returns:
boxed variant of the same class

getParameterAsString

public static java.lang.String getParameterAsString(java.lang.Class[] parameters)
Returns a comma-separated parameter type list in readable form, considering arrays and null-type parameters.

Parameters:
parameters - is the parameter types to render
Returns:
rendered list of parameters

getParameterAsString

public static java.lang.String getParameterAsString(java.lang.Class param)
Returns a parameter as a string text, allowing null values to represent a null select expression type.

Parameters:
param - is the parameter type
Returns:
string representation of parameter

getPrimitiveType

public static java.lang.Class getPrimitiveType(java.lang.Class clazz)
Returns the un-boxed class for the given class, or the class itself if already un-boxed or not a primitive type. For primitive boxed types returns the unboxed primitive type, e.g. returns int.class for passing Integer.class. For any other class, returns the class passed.

Parameters:
clazz - is the class to return the unboxed (or primitive) class for
Returns:
primitive variant of the same class

isNumeric

public static boolean isNumeric(java.lang.Class clazz)
Determines if the class passed in is one of the numeric classes.

Parameters:
clazz - to check
Returns:
true if numeric, false if not

isNumericNonFP

public static boolean isNumericNonFP(java.lang.Class clazz)
Determines if the class passed in is one of the numeric classes and not a floating point.

Parameters:
clazz - to check
Returns:
true if numeric and not a floating point, false if not

isAssignmentCompatible

public static boolean isAssignmentCompatible(java.lang.Class invocationType,
                                             java.lang.Class declarationType)
Returns true if 2 classes are assignment compatible.

Parameters:
invocationType - type to assign from
declarationType - type to assign to
Returns:
true if assignment compatible, false if not

isBoolean

public static boolean isBoolean(java.lang.Class clazz)
Determines if the class passed in is a boolean boxed or unboxed type.

Parameters:
clazz - to check
Returns:
true if boolean, false if not

getArithmaticCoercionType

public static java.lang.Class getArithmaticCoercionType(java.lang.Class typeOne,
                                                        java.lang.Class typeTwo)
                                                 throws CoercionException
Returns the coercion type for the 2 numeric types for use in arithmatic. Note: byte and short types always result in integer.

Parameters:
typeOne - is the first type
typeTwo - is the second type
Returns:
coerced type
Throws:
CoercionException - if types don't allow coercion

coerceBoxed

public static java.lang.Number coerceBoxed(java.lang.Number numToCoerce,
                                           java.lang.Class resultBoxedType)
Coerce the given number to the given type, assuming the type is a Boxed type. Allows coerce to lower resultion number. Does't coerce to primitive types.

Meant for statement compile-time use, not for runtime use.

Parameters:
numToCoerce - is the number to coerce to the given type
resultBoxedType - is the boxed result type to return
Returns:
the numToCoerce as a value in the given result type

isFloatingPointNumber

public static boolean isFloatingPointNumber(java.lang.Number number)
Returns true if the Number instance is a floating point number.

Parameters:
number - to check
Returns:
true if number is Float or Double type

isFloatingPointClass

public static boolean isFloatingPointClass(java.lang.Class clazz)
Returns true if the supplied type is a floating point number.

Parameters:
clazz - to check
Returns:
true if primitive or boxed float or double

getCompareToCoercionType

public static java.lang.Class getCompareToCoercionType(java.lang.Class typeOne,
                                                       java.lang.Class typeTwo)
                                                throws CoercionException
Returns for 2 classes to be compared via relational operator the Class type of common comparison. The output is always Long.class, Double.class, String.class or Boolean.class depending on whether the passed types are numeric and floating-point. Accepts primitive as well as boxed types.

Parameters:
typeOne - is the first type
typeTwo - is the second type
Returns:
One of Long.class, Double.class or String.class
Throws:
CoercionException - if the types cannot be compared

isBigNumberType

public static boolean isBigNumberType(java.lang.Class clazz)
Returns true if the type is one of the big number types, i.e. BigDecimal or BigInteger

Parameters:
clazz - to check
Returns:
true for big number

canCoerce

public static boolean canCoerce(java.lang.Class numberClassToBeCoerced,
                                java.lang.Class numberClassToCoerceTo)
Determines if a number can be coerced upwards to another number class without loss.

Clients must pass in two classes that are numeric types.

Any number class can be coerced to double, while only double cannot be coerced to float. Any non-floating point number can be coerced to long. Integer can be coerced to Byte and Short even though loss is possible, for convenience.

Parameters:
numberClassToBeCoerced - the number class to be coerced
numberClassToCoerceTo - the number class to coerce to
Returns:
true if numbers can be coerced without loss, false if not

getBoxedClassName

public static java.lang.String getBoxedClassName(java.lang.String className)
Returns for the class name given the class name of the boxed (wrapped) type if the class name is one of the Java primitive types.

Parameters:
className - is a class name, a Java primitive type or other class
Returns:
boxed class name if Java primitive type, or just same class name passed in if not a primitive type

isJavaBuiltinDataType

public static boolean isJavaBuiltinDataType(java.lang.Class clazz)
Returns true if the class passed in is a Java built-in data type (primitive or wrapper) including String and 'null'.

Parameters:
clazz - to check
Returns:
true if built-in data type, or false if not

getCommonCoercionType

public static java.lang.Class getCommonCoercionType(java.lang.Class[] types)
                                             throws CoercionException
Determines a common denominator type to which one or more types can be casted or coerced. For use in determining the result type in certain expressions (coalesce, case).

Null values are allowed as part of the input and indicate a 'null' constant value in an expression tree. Such as value doesn't have any type and can be ignored in determining a result type.

For numeric types, determines a coercion type that all types can be converted to via the method getArithmaticCoercionType.

Indicates that there is no common denominator type by throwing CoercionException.

Parameters:
types - is an array of one or more types, which can be Java built-in (primitive or wrapper) or user types
Returns:
common denominator type if any can be found, for use in comparison
Throws:
CoercionException - when no coercion type could be determined

getClassForName

public static java.lang.Class getClassForName(java.lang.String className)
                                       throws java.lang.ClassNotFoundException
Returns the class given a fully-qualified class name.

Parameters:
className - is the fully-qualified class name, java primitive types included.
Returns:
class for name
Throws:
java.lang.ClassNotFoundException - if the class cannot be found

getClassForSimpleName

public static java.lang.Class getClassForSimpleName(java.lang.String className)
                                             throws EventAdapterException
Returns the boxed class for the given classname, recognizing all primitive and abbreviations, uppercase and lowercase.

Recognizes "int" as Integer.class and "strIng" as String.class, and "Integer" as Integer.class, and so on.

Parameters:
className - is the name to recognize
Returns:
class
Throws:
EventAdapterException - is throw if the class cannot be identified

getSimpleNameForClass

public static java.lang.String getSimpleNameForClass(java.lang.Class clazz)

getPrimitiveClassForName

public static java.lang.Class getPrimitiveClassForName(java.lang.String typeName)
Returns the class for a Java primitive type name, ignoring case, and considering String as a primitive.

Parameters:
typeName - is a potential primitive Java type, or some other type name
Returns:
class for primitive type name, or null if not a primitive type.

parse

public static java.lang.Object parse(java.lang.Class clazz,
                                     java.lang.String text)
Parse the String using the given Java built-in class for parsing.

Parameters:
clazz - is the class to parse the value to
text - is the text to parse
Returns:
value matching the type passed in

isImplementsInterface

public static boolean isImplementsInterface(java.lang.Class clazz,
                                            java.lang.Class interfaceClass)
Method to check if a given class, and its superclasses and interfaces (deep), implement a given interface.

Parameters:
clazz - to check, including all its superclasses and their interfaces and extends
interfaceClass - is the interface class to look for
Returns:
true if such interface is implemented by any of the clazz or its superclasses or extends by any interface and superclasses (deep check)

isSubclassOrImplementsInterface

public static boolean isSubclassOrImplementsInterface(java.lang.Class extendorOrImplementor,
                                                      java.lang.Class extendedOrImplemented)
Method to check if a given class, and its superclasses and interfaces (deep), implement a given interface or extend a given class.

Parameters:
extendorOrImplementor - is the class to inspects its extends and implements clauses
extendedOrImplemented - is the potential interface, or superclass, to check
Returns:
true if such interface is implemented by any of the clazz or its superclasses or extends by any interface and superclasses (deep check)

instantiate

public static java.lang.Object instantiate(java.lang.Class implementedOrExtendedClass,
                                           java.lang.String className)
                                    throws ClassInstantiationException
Looks up the given class and checks that it implements or extends the required interface, and instantiates an object.

Parameters:
implementedOrExtendedClass - is the class that the looked-up class should extend or implement
className - of the class to load, check type and instantiate
Returns:
instance of given class, via newInstance
Throws:
ClassInstantiationException - if the type does not match or the class cannot be loaded or an object instantiated

getSuper

public static void getSuper(java.lang.Class clazz,
                            java.util.Set<java.lang.Class> result)
Populates all interface and superclasses for the given class, recursivly.

Parameters:
clazz - to reflect upon
result - set of classes to populate

isSimpleNameFullyQualfied

public static boolean isSimpleNameFullyQualfied(java.lang.String simpleClassName,
                                                java.lang.String fullyQualifiedClassname)
Returns true if the simple class name is the class name of the fully qualified classname.

This method does not verify validity of class and package names, it uses simple string compare inspecting the trailing part of the fully qualified class name.

Parameters:
simpleClassName - simple class name
fullyQualifiedClassname - fully qualified class name contains package name and simple class name
Returns:
true if simple class name of the fully qualified class name, false if not

isFragmentableType

public static boolean isFragmentableType(java.lang.Class propertyType)
Returns true if the Class is a fragmentable type, i.e. not a primitive or boxed type or any of the common built-in types or does not implement Map.

Parameters:
propertyType - type to check
Returns:
true if fragmentable

getSuperInterfaces

public static java.lang.Class[] getSuperInterfaces(java.lang.Class clazz)

getSuperInterfaces

public static void getSuperInterfaces(java.lang.Class clazz,
                                      java.util.Set<java.lang.Class> result)

getGenericReturnType

public static java.lang.Class getGenericReturnType(java.lang.reflect.Method method,
                                                   java.lang.reflect.Field field,
                                                   boolean isAllowNull)
Returns the generic type parameter of a return value by a field or method.

Parameters:
method - method or null if field
field - field or null if method
isAllowNull - whether null is allowed as a return value or expected Object.class
Returns:
generic type parameter

getGenericReturnTypeMap

public static java.lang.Class getGenericReturnTypeMap(java.lang.reflect.Method method,
                                                      java.lang.reflect.Field field,
                                                      boolean isAllowNull)
Returns the second generic type parameter of a return value by a field or method.

Parameters:
method - method or null if field
field - field or null if method
isAllowNull - whether null is allowed as a return value or expected Object.class
Returns:
generic type parameter

getGenericReturnType

public static java.lang.Class getGenericReturnType(java.lang.reflect.Method method,
                                                   boolean isAllowNull)
Returns the generic type parameter of a return value by a method.

Parameters:
method - method or null if field
isAllowNull - whether null is allowed as a return value or expected Object.class
Returns:
generic type parameter

getGenericReturnTypeMap

public static java.lang.Class getGenericReturnTypeMap(java.lang.reflect.Method method,
                                                      boolean isAllowNull)
Returns the second generic type parameter of a return value by a field or method.

Parameters:
method - method or null if field
isAllowNull - whether null is allowed as a return value or expected Object.class
Returns:
generic type parameter

getGenericFieldType

public static java.lang.Class getGenericFieldType(java.lang.reflect.Field field,
                                                  boolean isAllowNull)
Returns the generic type parameter of a return value by a field.

Parameters:
field - field or null if method
isAllowNull - whether null is allowed as a return value or expected Object.class
Returns:
generic type parameter

getGenericFieldTypeMap

public static java.lang.Class getGenericFieldTypeMap(java.lang.reflect.Field field,
                                                     boolean isAllowNull)
Returns the generic type parameter of a return value by a field or method.

Parameters:
field - field or null if method
isAllowNull - whether null is allowed as a return value or expected Object.class
Returns:
generic type parameter

getGenericType

public static java.lang.Class getGenericType(java.lang.reflect.Type t,
                                             int index)

getAnnotationHook

public static java.lang.Object getAnnotationHook(java.lang.annotation.Annotation[] annotations,
                                                 HookType hookType,
                                                 java.lang.Class interfaceExpected,
                                                 MethodResolutionService resolution)
                                          throws ExprValidationException
Returns an instance of a hook as specified by an annotation.

Parameters:
annotations - to search
hookType - type to look for
interfaceExpected - interface required
resolution - for resolving references, optional, if not provided then using Class.forName
Returns:
hook instance
Throws:
ExprValidationException - if instantiation failed

resolveIdentAsEnumConst

public static java.lang.Object resolveIdentAsEnumConst(java.lang.String constant,
                                                       MethodResolutionService methodResolutionService,
                                                       EngineImportService engineImportService)
                                                throws ExprValidationException
Resolve a string constant as a possible enumeration value, returning null if not resolved.

Parameters:
constant - to resolve
methodResolutionService - for statement-level use to resolve enums, can be null
engineImportService - for engine-level use to resolve enums, can be null
Returns:
null or enumeration value
Throws:
ExprValidationException - if there is an error accessing the enum

getArrayType

public static java.lang.Class getArrayType(java.lang.Class resultType)

getClassNameFullyQualPretty

public static java.lang.String getClassNameFullyQualPretty(java.lang.Class clazz)

getClassNameFullyQualPrettyWithClassloader

public static java.lang.String getClassNameFullyQualPrettyWithClassloader(java.lang.Class clazz)

getClassLoaderId

public static java.lang.String getClassLoaderId(java.lang.ClassLoader classLoader)

getMethodByName

public static java.lang.reflect.Method getMethodByName(java.lang.Class clazz,
                                                       java.lang.String methodName)

printInstance

public static java.lang.String printInstance(java.lang.Object instance,
                                             boolean fullyQualified)

writeInstance

public static void writeInstance(java.io.StringWriter writer,
                                 java.lang.Object instance,
                                 boolean fullyQualified)

writeInstance

public static void writeInstance(java.io.StringWriter writer,
                                 java.lang.String title,
                                 java.lang.Object instance)

getMessageInvocationTarget

public static java.lang.String getMessageInvocationTarget(java.lang.String statementName,
                                                          java.lang.reflect.Method method,
                                                          java.lang.String classOrPropertyName,
                                                          java.lang.Object[] args,
                                                          java.lang.reflect.InvocationTargetException e)

isDatetimeClass

public static boolean isDatetimeClass(java.lang.Class inputType)

getClassObjectFromPropertyTypeNames

public static java.util.Map<java.lang.String,java.lang.Object> getClassObjectFromPropertyTypeNames(java.util.Properties properties)

getClassInClasspath

public static java.lang.Class getClassInClasspath(java.lang.String classname)

isSignatureCompatible

public static boolean isSignatureCompatible(java.lang.Class<?>[] one,
                                            java.lang.Class<?>[] two)

findRequiredMethod

public static java.lang.reflect.Method findRequiredMethod(java.lang.Class clazz,
                                                          java.lang.String methodName)

findMethodsByNameStartsWith

public static java.util.List<java.lang.reflect.Method> findMethodsByNameStartsWith(java.lang.Class clazz,
                                                                                   java.lang.String methodName)

getAnnotations

public static java.util.List<java.lang.annotation.Annotation> getAnnotations(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
                                                                             java.lang.annotation.Annotation[] annotations)

isAnnotationListed

public static boolean isAnnotationListed(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
                                         java.lang.annotation.Annotation[] annotations)

findAnnotatedFields

public static java.util.Set<java.lang.reflect.Field> findAnnotatedFields(java.lang.Class targetClass,
                                                                         java.lang.Class<? extends java.lang.annotation.Annotation> annotation)

findAnnotatedMethods

public static java.util.Set<java.lang.reflect.Method> findAnnotatedMethods(java.lang.Class targetClass,
                                                                           java.lang.Class<? extends java.lang.annotation.Annotation> annotation)

setFieldForAnnotation

public static void setFieldForAnnotation(java.lang.Object target,
                                         java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
                                         java.lang.Object value)

isGetArrayType

public static Pair<java.lang.String,java.lang.Boolean> isGetArrayType(java.lang.String type)

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com