Class GrailsClassUtils
- java.lang.Object
-
- grails.util.GrailsClassUtils
-
public class GrailsClassUtils extends java.lang.ObjectUtility methods for dealing with Grails class artifacts.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.Class<?>,java.lang.Class<?>>PRIMITIVE_TYPE_COMPATIBLE_CLASSES
-
Constructor Summary
Constructors Constructor Description GrailsClassUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.Object[]collectionToObjectArray(java.util.Collection c)Convenience method for converting a collection to an Object[]static java.util.CollectioncreateConcreteCollection(java.lang.Class interfaceType)Creates a concrete collection for the suppied interfacestatic org.springframework.cglib.reflect.FastClassfastClass(java.lang.Class superClass)static java.lang.StringfindPropertyNameForValue(java.lang.Object target, java.lang.Object obj)Locates the name of a property for the given value on the target object using Groovy's meta APIs.static java.lang.Class[]getAllInterfaces(java.lang.Object instance)Return all interfaces that the given instance implements as array, including ones implemented by superclasses.static java.util.Set<java.lang.Class>getAllInterfacesAsSet(java.lang.Object instance)Return all interfaces that the given instance implements as Set, including ones implemented by superclasses.static java.lang.Class<?>[]getAllInterfacesForClass(java.lang.Class<?> clazz)Return all interfaces that the given class implements as array, including ones implemented by superclasses.static java.lang.Class<?>[]getAllInterfacesForClass(java.lang.Class<?> clazz, java.lang.ClassLoader classLoader)Return all interfaces that the given class implements as array, including ones implemented by superclasses.static java.util.Set<java.lang.Class>getAllInterfacesForClassAsSet(java.lang.Class clazz)Return all interfaces that the given class implements as Set, including ones implemented by superclasses.static java.util.Set<java.lang.Class>getAllInterfacesForClassAsSet(java.lang.Class clazz, java.lang.ClassLoader classLoader)Return all interfaces that the given class implements as Set, including ones implemented by superclasses.static booleangetBooleanFromMap(java.lang.String key, java.util.Map<?,?> map)Retrieves a boolean value from a Map for the given keystatic booleangetBooleanFromMap(java.lang.String key, java.util.Map<?,?> map, boolean defaultValue)Retrieves a boolean value from a Map for the given keystatic groovy.lang.MetaClassgetExpandoMetaClass(java.lang.Class clazz)static java.lang.ObjectgetFieldValue(java.lang.Object obj, java.lang.String name)Get the value of a declared field on an objectstatic java.lang.StringgetGetterName(java.lang.String propertyName)Calculate the name for a getter method to retrieve the specified propertystatic java.beans.PropertyDescriptor[]getPropertiesAssignableToType(java.lang.Class<?> clazz, java.lang.Class<?> propertySuperType)Retrieves all the properties of the given class which are assignable to the given typestatic java.beans.PropertyDescriptor[]getPropertiesOfType(java.lang.Class<?> clazz, java.lang.Class<?> propertyType)Retrieves all the properties of the given class for the given typestatic java.beans.PropertyDescriptorgetProperty(java.lang.Class<?> clazz, java.lang.String propertyName)Retrieves a property of the given class of the specified name and typestatic java.beans.PropertyDescriptorgetProperty(java.lang.Class<?> clazz, java.lang.String propertyName, java.lang.Class<?> propertyType)Retrieves a property of the given class of the specified name and typestatic java.beans.PropertyDescriptorgetPropertyDescriptorForValue(java.lang.Object instance, java.lang.Object propertyValue)Retrieves a PropertyDescriptor for the specified instance and property valuestatic java.lang.StringgetPropertyForGetter(java.lang.String getterName)Deprecated.UsegetPropertyForGetter(String, Class)instead because this method has a defect for "is.." method with Boolean return types.static java.lang.StringgetPropertyForGetter(java.lang.String getterName, java.lang.Class returnType)Returns a property name equivalent for the given getter name and return type or null if it is not a valid getter.static java.lang.StringgetPropertyForGetter(java.lang.String getterName, java.lang.String returnType)Returns a property name equivalent for the given getter name and return type or null if it is not a valid getter.static java.lang.StringgetPropertyForSetter(java.lang.String setterName)Returns a property name equivalent for the given setter name or null if it is not a valid setter.static java.lang.ObjectgetPropertyOrStaticPropertyOrFieldValue(java.lang.Object obj, java.lang.String name)Looks for a property of the reference instance with a given name.static java.lang.ObjectgetPropertyOrStaticPropertyOrFieldValue(org.springframework.beans.BeanWrapper ref, java.lang.Object obj, java.lang.String name)static java.lang.Class<?>getPropertyType(java.lang.Class<?> clazz, java.lang.String propertyName)Returns the type of the given property contained within the specified classstatic java.lang.ObjectgetPropertyValueOfNewInstance(java.lang.Class<?> clazz, java.lang.String propertyName)Returns the value of the specified property and type from an instance of the specified Grails classstatic java.lang.ObjectgetPropertyValueOfNewInstance(java.lang.Class clazz, java.lang.String propertyName, java.lang.Class<?> propertyType)Returns the value of the specified property and type from an instance of the specified Grails classstatic java.lang.StringgetSetterName(java.lang.String propertyName)Retrieves the name of a setter for the specified property namestatic java.lang.ObjectgetStaticFieldValue(java.lang.Class<?> clazz, java.lang.String name)Get a static field value.static java.lang.ObjectgetStaticPropertyValue(java.lang.Class<?> clazz, java.lang.String name)Get a static property value, which has a public static getter or is just a public static field.static java.lang.BooleanhasBeenEnhancedForFeature(java.lang.Class<?> controllerClass, java.lang.String featureName)Checks to see if a class is marked with @grails.artefact.Enhanced and if the enhancedFor attribute of the annotation contains a specific feature namestatic java.lang.ObjectinstantiateFromConfig(groovy.util.ConfigObject config, java.lang.String configKey, java.lang.String defaultClassName)static java.lang.ObjectinstantiateFromFlatConfig(java.util.Map<java.lang.String,java.lang.Object> flatConfig, java.lang.String configKey, java.lang.String defaultClassName)static booleanisAssignableOrConvertibleFrom(java.lang.Class<?> clazz, java.lang.Class<?> type)Returns true if the specified clazz parameter is either the same as, or is a superclass or superinterface of, the specified type parameter.static booleanisClassBelowPackage(java.lang.Class<?> theClass, java.util.List<?> packageList)Returns whether the specified class is either within one of the specified packages or within a subpackage of one of the packagesstatic booleanisGetter(java.lang.String name, java.lang.Class<?>[] args)Deprecated.useisGetter(String, Class, Class[])instead because this method has a defect for "is.." method with Boolean return types.static booleanisGetter(java.lang.String name, java.lang.Class returnType, java.lang.Class<?>[] args)Returns true if the name of the method specified and the number of arguments make it a javabean property getter.static booleanisGroovyAssignableFrom(java.lang.Class<?> leftType, java.lang.Class<?> rightType)Tests whether or not the left hand type is compatible with the right hand type in Groovy terms, i.e.static booleanisMatchBetweenPrimativeAndWrapperTypes(java.lang.Class leftType, java.lang.Class rightType)Detect if left and right types are matching types.static booleanisPropertyGetter(java.lang.reflect.Method method)Check whether the specified method is a property getterstatic booleanisPropertyInherited(java.lang.Class clz, java.lang.String propertyName)Checks whether the specified property is inherited from a super classstatic booleanisPropertyOfType(java.lang.Class<?> clazz, java.lang.String propertyName, java.lang.Class<?> type)Returns true if the specified property in the specified class is of the specified typestatic booleanisPublicField(java.lang.Object obj, java.lang.String name)Work out if the specified object has a public field with the name supplied.static booleanisPublicStatic(java.lang.reflect.Field f)Determine whether the field is declared public staticstatic booleanisPublicStatic(java.lang.reflect.Method m)Determine whether the method is declared public staticstatic booleanisSetter(java.lang.String name, java.lang.Class[] args)Returns true if the name of the method specified and the number of arguments make it a javabean property setter.static booleanisStaticProperty(java.lang.Class clazz, java.lang.String propertyName)Work out if the specified property is readable and static.static booleanisVisible(java.lang.Class<?> clazz, java.lang.ClassLoader classLoader)Check whether the given class is visible in the given ClassLoader.
-
-
-
Method Detail
-
getAllInterfaces
public static java.lang.Class[] getAllInterfaces(java.lang.Object instance)
Return all interfaces that the given instance implements as array, including ones implemented by superclasses.- Parameters:
instance- the instance to analyze for interfaces- Returns:
- all interfaces that the given instance implements as array
-
getAllInterfacesForClass
public static java.lang.Class<?>[] getAllInterfacesForClass(java.lang.Class<?> clazz)
Return all interfaces that the given class implements as array, including ones implemented by superclasses.If the class itself is an interface, it gets returned as sole interface.
- Parameters:
clazz- the class to analyze for interfaces- Returns:
- all interfaces that the given object implements as array
-
getAllInterfacesForClass
public static java.lang.Class<?>[] getAllInterfacesForClass(java.lang.Class<?> clazz, java.lang.ClassLoader classLoader)Return all interfaces that the given class implements as array, including ones implemented by superclasses.If the class itself is an interface, it gets returned as sole interface.
- Parameters:
clazz- the class to analyze for interfacesclassLoader- the ClassLoader that the interfaces need to be visible in (may benullwhen accepting all declared interfaces)- Returns:
- all interfaces that the given object implements as array
-
getAllInterfacesAsSet
public static java.util.Set<java.lang.Class> getAllInterfacesAsSet(java.lang.Object instance)
Return all interfaces that the given instance implements as Set, including ones implemented by superclasses.- Parameters:
instance- the instance to analyze for interfaces- Returns:
- all interfaces that the given instance implements as Set
-
getAllInterfacesForClassAsSet
public static java.util.Set<java.lang.Class> getAllInterfacesForClassAsSet(java.lang.Class clazz)
Return all interfaces that the given class implements as Set, including ones implemented by superclasses.If the class itself is an interface, it gets returned as sole interface.
- Parameters:
clazz- the class to analyze for interfaces- Returns:
- all interfaces that the given object implements as Set
-
getAllInterfacesForClassAsSet
public static java.util.Set<java.lang.Class> getAllInterfacesForClassAsSet(java.lang.Class clazz, java.lang.ClassLoader classLoader)Return all interfaces that the given class implements as Set, including ones implemented by superclasses.If the class itself is an interface, it gets returned as sole interface.
- Parameters:
clazz- the class to analyze for interfacesclassLoader- the ClassLoader that the interfaces need to be visible in (may benullwhen accepting all declared interfaces)- Returns:
- all interfaces that the given object implements as Set
-
isVisible
public static boolean isVisible(java.lang.Class<?> clazz, java.lang.ClassLoader classLoader)Check whether the given class is visible in the given ClassLoader.- Parameters:
clazz- the class to check (typically an interface)classLoader- the ClassLoader to check against (may benull, in which case this method will always returntrue)
-
isPropertyOfType
public static boolean isPropertyOfType(java.lang.Class<?> clazz, java.lang.String propertyName, java.lang.Class<?> type)Returns true if the specified property in the specified class is of the specified type- Parameters:
clazz- The class which contains the propertypropertyName- The property nametype- The type to check- Returns:
- A boolean value
-
getPropertyValueOfNewInstance
public static java.lang.Object getPropertyValueOfNewInstance(java.lang.Class clazz, java.lang.String propertyName, java.lang.Class<?> propertyType)Returns the value of the specified property and type from an instance of the specified Grails class- Parameters:
clazz- The name of the class which contains the propertypropertyName- The property namepropertyType- The property type- Returns:
- The value of the property or null if none exists
-
getPropertyValueOfNewInstance
public static java.lang.Object getPropertyValueOfNewInstance(java.lang.Class<?> clazz, java.lang.String propertyName)Returns the value of the specified property and type from an instance of the specified Grails class- Parameters:
clazz- The name of the class which contains the propertypropertyName- The property name- Returns:
- The value of the property or null if none exists
-
getPropertyDescriptorForValue
public static java.beans.PropertyDescriptor getPropertyDescriptorForValue(java.lang.Object instance, java.lang.Object propertyValue)Retrieves a PropertyDescriptor for the specified instance and property value- Parameters:
instance- The instancepropertyValue- The value of the property- Returns:
- The PropertyDescriptor
-
getPropertyType
public static java.lang.Class<?> getPropertyType(java.lang.Class<?> clazz, java.lang.String propertyName)Returns the type of the given property contained within the specified class- Parameters:
clazz- The class which contains the propertypropertyName- The name of the property- Returns:
- The property type or null if none exists
-
getPropertiesOfType
public static java.beans.PropertyDescriptor[] getPropertiesOfType(java.lang.Class<?> clazz, java.lang.Class<?> propertyType)Retrieves all the properties of the given class for the given type- Parameters:
clazz- The class to retrieve the properties frompropertyType- The type of the properties you wish to retrieve- Returns:
- An array of PropertyDescriptor instances
-
getPropertiesAssignableToType
public static java.beans.PropertyDescriptor[] getPropertiesAssignableToType(java.lang.Class<?> clazz, java.lang.Class<?> propertySuperType)Retrieves all the properties of the given class which are assignable to the given type- Parameters:
clazz- The class to retrieve the properties frompropertySuperType- The type of the properties you wish to retrieve- Returns:
- An array of PropertyDescriptor instances
-
getProperty
public static java.beans.PropertyDescriptor getProperty(java.lang.Class<?> clazz, java.lang.String propertyName, java.lang.Class<?> propertyType)Retrieves a property of the given class of the specified name and type- Parameters:
clazz- The class to retrieve the property frompropertyName- The name of the propertypropertyType- The type of the property- Returns:
- A PropertyDescriptor instance or null if none exists
-
getProperty
public static java.beans.PropertyDescriptor getProperty(java.lang.Class<?> clazz, java.lang.String propertyName)Retrieves a property of the given class of the specified name and type- Parameters:
clazz- The class to retrieve the property frompropertyName- The name of the property- Returns:
- A PropertyDescriptor instance or null if none exists
-
collectionToObjectArray
public static java.lang.Object[] collectionToObjectArray(java.util.Collection c)
Convenience method for converting a collection to an Object[]- Parameters:
c- The collection- Returns:
- An object array
-
isMatchBetweenPrimativeAndWrapperTypes
public static boolean isMatchBetweenPrimativeAndWrapperTypes(java.lang.Class leftType, java.lang.Class rightType)Detect if left and right types are matching types. In particular, test if one is a primitive type and the other is the corresponding Java wrapper type. Primitive and wrapper classes may be passed to either arguments.- Parameters:
leftType-rightType-- Returns:
- true if one of the classes is a native type and the other the object representation of the same native type
-
isGroovyAssignableFrom
public static boolean isGroovyAssignableFrom(java.lang.Class<?> leftType, java.lang.Class<?> rightType)Tests whether or not the left hand type is compatible with the right hand type in Groovy terms, i.e. can the left type be assigned a value of the right hand type in Groovy.
This handles Java primitive type equivalence and uses isAssignableFrom for all other types, with a bit of magic for native types and polymorphism i.e. Number assigned an int. If either parameter is null an exception is thrown
- Parameters:
leftType- The type of the left hand part of a notional assignmentrightType- The type of the right hand part of a notional assignment- Returns:
- true if values of the right hand type can be assigned in Groovy to variables of the left hand type.
-
isStaticProperty
public static boolean isStaticProperty(java.lang.Class clazz, java.lang.String propertyName)Work out if the specified property is readable and static. Java introspection does not recognize this concept of static properties but Groovy does. We also consider public static fields as static properties with no getters/setters
- Parameters:
clazz- The class to check for static propertypropertyName- The property name- Returns:
- true if the property with name propertyName has a static getter method
-
isPublicStatic
public static boolean isPublicStatic(java.lang.reflect.Method m)
Determine whether the method is declared public static- Parameters:
m-- Returns:
- true if the method is declared public static
-
isPublicStatic
public static boolean isPublicStatic(java.lang.reflect.Field f)
Determine whether the field is declared public static- Parameters:
f-- Returns:
- true if the field is declared public static
-
getGetterName
public static java.lang.String getGetterName(java.lang.String propertyName)
Calculate the name for a getter method to retrieve the specified property- Parameters:
propertyName-- Returns:
- The name for the getter method for this property, if it were to exist, i.e. getConstraints
-
getStaticFieldValue
public static java.lang.Object getStaticFieldValue(java.lang.Class<?> clazz, java.lang.String name)Get a static field value.
- Parameters:
clazz- The class to check for static propertyname- The field name- Returns:
- The value if there is one, or null if unset OR there is no such field
-
getStaticPropertyValue
public static java.lang.Object getStaticPropertyValue(java.lang.Class<?> clazz, java.lang.String name)Get a static property value, which has a public static getter or is just a public static field.
- Parameters:
clazz- The class to check for static propertyname- The property name- Returns:
- The value if there is one, or null if unset OR there is no such property
-
getPropertyOrStaticPropertyOrFieldValue
public static java.lang.Object getPropertyOrStaticPropertyOrFieldValue(java.lang.Object obj, java.lang.String name) throws org.springframework.beans.BeansExceptionLooks for a property of the reference instance with a given name.
If found its value is returned. We follow the Java bean conventions with augmentation for groovy support and static fields/properties. We will therefore match, in this order:
- Standard public bean property (with getter or just public field, using normal introspection)
- Public static property with getter method
- Public static field
- Returns:
- property value or null if no property found
- Throws:
org.springframework.beans.BeansException
-
getPropertyOrStaticPropertyOrFieldValue
public static java.lang.Object getPropertyOrStaticPropertyOrFieldValue(org.springframework.beans.BeanWrapper ref, java.lang.Object obj, java.lang.String name)
-
getFieldValue
public static java.lang.Object getFieldValue(java.lang.Object obj, java.lang.String name)Get the value of a declared field on an object- Parameters:
obj-name-- Returns:
- The object value or null if there is no such field or access problems
-
isPublicField
public static boolean isPublicField(java.lang.Object obj, java.lang.String name)Work out if the specified object has a public field with the name supplied.- Parameters:
obj-name-- Returns:
- true if a public field with the name exists
-
isPropertyInherited
public static boolean isPropertyInherited(java.lang.Class clz, java.lang.String propertyName)Checks whether the specified property is inherited from a super class- Parameters:
clz- The class to checkpropertyName- The property name- Returns:
- true if the property is inherited
-
isPropertyGetter
public static boolean isPropertyGetter(java.lang.reflect.Method method)
Check whether the specified method is a property getter- Parameters:
method- The method- Returns:
- true if the method is a property getter
-
createConcreteCollection
public static java.util.Collection createConcreteCollection(java.lang.Class interfaceType)
Creates a concrete collection for the suppied interface- Parameters:
interfaceType- The interface- Returns:
- ArrayList for List, TreeSet for SortedSet, HashSet for Set etc.
-
isSetter
public static boolean isSetter(java.lang.String name, java.lang.Class[] args)Returns true if the name of the method specified and the number of arguments make it a javabean property setter. The name is assumed to be a valid Java method name, that is not verified.- Parameters:
name- The name of the methodargs- The arguments- Returns:
- true if it is a javabean property setter
-
getExpandoMetaClass
public static groovy.lang.MetaClass getExpandoMetaClass(java.lang.Class clazz)
-
isAssignableOrConvertibleFrom
public static boolean isAssignableOrConvertibleFrom(java.lang.Class<?> clazz, java.lang.Class<?> type)Returns true if the specified clazz parameter is either the same as, or is a superclass or superinterface of, the specified type parameter. Converts primitive types to compatible class automatically.- Parameters:
clazz-type-- Returns:
- true if the class is a taglib
- See Also:
Class.isAssignableFrom(Class)
-
getBooleanFromMap
public static boolean getBooleanFromMap(java.lang.String key, java.util.Map<?,?> map)Retrieves a boolean value from a Map for the given key- Parameters:
key- The key that references the boolean valuemap- The map to look in- Returns:
- A boolean value which will be false if the map is null, the map doesn't contain the key or the value is false
-
getBooleanFromMap
public static boolean getBooleanFromMap(java.lang.String key, java.util.Map<?,?> map, boolean defaultValue)Retrieves a boolean value from a Map for the given key- Parameters:
key- The key that references the boolean valuemap- The map to look in- Returns:
- A boolean value which will be false if the map is null, the map doesn't contain the key or the value is false
-
findPropertyNameForValue
public static java.lang.String findPropertyNameForValue(java.lang.Object target, java.lang.Object obj)Locates the name of a property for the given value on the target object using Groovy's meta APIs. Note that this method uses the reference so the incorrect result could be returned for two properties that refer to the same reference. Use with caution.- Parameters:
target- The targetobj- The property value- Returns:
- The property name or null
-
getSetterName
public static java.lang.String getSetterName(java.lang.String propertyName)
Retrieves the name of a setter for the specified property name- Parameters:
propertyName- The property name- Returns:
- The setter equivalent
-
isGetter
public static boolean isGetter(java.lang.String name, java.lang.Class<?>[] args)Deprecated.useisGetter(String, Class, Class[])instead because this method has a defect for "is.." method with Boolean return types.Returns true if the name of the method specified and the number of arguments make it a javabean property getter. The name is assumed to be a valid Java method name, that is not verified.- Parameters:
name- The name of the methodargs- The arguments- Returns:
- true if it is a javabean property getter
-
isGetter
public static boolean isGetter(java.lang.String name, java.lang.Class returnType, java.lang.Class<?>[] args)Returns true if the name of the method specified and the number of arguments make it a javabean property getter. The name is assumed to be a valid Java method name, that is not verified.- Parameters:
name- The name of the methodreturnType- The return type of the methodargs- The arguments- Returns:
- true if it is a javabean property getter
-
getPropertyForGetter
public static java.lang.String getPropertyForGetter(java.lang.String getterName)
Deprecated.UsegetPropertyForGetter(String, Class)instead because this method has a defect for "is.." method with Boolean return types.Returns a property name equivalent for the given getter name or null if it is not a valid getter. If not null or empty the getter name is assumed to be a valid identifier.- Parameters:
getterName- The getter name- Returns:
- The property name equivalent
-
getPropertyForGetter
public static java.lang.String getPropertyForGetter(java.lang.String getterName, java.lang.Class returnType)Returns a property name equivalent for the given getter name and return type or null if it is not a valid getter. If not null or empty the getter name is assumed to be a valid identifier.- Parameters:
getterName- The getter namereturnType- The type the method returns- Returns:
- The property name equivalent
-
getPropertyForGetter
public static java.lang.String getPropertyForGetter(java.lang.String getterName, java.lang.String returnType)Returns a property name equivalent for the given getter name and return type or null if it is not a valid getter. If not null or empty the getter name is assumed to be a valid identifier.- Parameters:
getterName- The getter namereturnType- The class name the method returns- Returns:
- The property name equivalent
-
getPropertyForSetter
public static java.lang.String getPropertyForSetter(java.lang.String setterName)
Returns a property name equivalent for the given setter name or null if it is not a valid setter. If not null or empty the setter name is assumed to be a valid identifier.- Parameters:
setterName- The setter name, must be null or empty or a valid identifier name- Returns:
- The property name equivalent
-
isClassBelowPackage
public static boolean isClassBelowPackage(java.lang.Class<?> theClass, java.util.List<?> packageList)Returns whether the specified class is either within one of the specified packages or within a subpackage of one of the packages- Parameters:
theClass- The classpackageList- The list of packages- Returns:
- true if it is within the list of specified packages
-
instantiateFromConfig
public static java.lang.Object instantiateFromConfig(groovy.util.ConfigObject config, java.lang.String configKey, java.lang.String defaultClassName) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.LinkageError- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.ClassNotFoundExceptionjava.lang.LinkageError
-
instantiateFromFlatConfig
public static java.lang.Object instantiateFromFlatConfig(java.util.Map<java.lang.String,java.lang.Object> flatConfig, java.lang.String configKey, java.lang.String defaultClassName) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.LinkageError- Throws:
java.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.ClassNotFoundExceptionjava.lang.LinkageError
-
hasBeenEnhancedForFeature
public static java.lang.Boolean hasBeenEnhancedForFeature(java.lang.Class<?> controllerClass, java.lang.String featureName)Checks to see if a class is marked with @grails.artefact.Enhanced and if the enhancedFor attribute of the annotation contains a specific feature name- Parameters:
controllerClass- The class to inspectfeatureName- The name of a feature to check for- Returns:
- true if controllerClass is marked with Enhanced and the enhancedFor attribute includes featureName, otherwise returns false
- See Also:
Enhanced,Enhanced.enhancedFor()
-
fastClass
public static org.springframework.cglib.reflect.FastClass fastClass(java.lang.Class superClass)
-
-