public abstract class AbstractMetaClass<T> extends MetaClass
Modifier and Type | Field and Description |
---|---|
protected MetaParameterizedType |
genericSuperClass |
protected MetaParameterizedType |
parameterizedType |
Modifier | Constructor and Description |
---|---|
protected |
AbstractMetaClass(T enclosedMetaObject) |
asArrayOf, getCanonicalName, getComponentType, getConstructors, getDeclaredClasses, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredMethods, getErased, getField, getFields, getFullyQualifiedName, getInterfaces, getMethods, getName, getPackageName, getSuperClass, isAbstract, isAnnotation, isAnonymousClass, isArray, isConcrete, isEnum, isFinal, isInterface, isPrimitive, isPrivate, isProtected, isPublic, isStatic, isSynthetic, isVoid
isAnnotationPresent
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getTypeParameters
getAnnotations
protected MetaParameterizedType parameterizedType
protected MetaParameterizedType genericSuperClass
protected AbstractMetaClass(T enclosedMetaObject)
public String getFullyQualifiedNameWithTypeParms()
getFullyQualifiedNameWithTypeParms
in class MetaClass
protected static MetaMethod _getMethod(MetaMethod[] methods, String name, MetaClass... parmTypes)
protected static MetaConstructor _getConstructor(MetaConstructor[] constructors, MetaClass... parmTypes)
public MetaMethod getMethod(String name, Class... parmTypes)
public MetaMethod getMethod(String name, MetaClass... parameters)
public MetaMethod getDeclaredMethod(String name, Class... parmTypes)
getDeclaredMethod
in class MetaClass
public MetaMethod getDeclaredMethod(String name, MetaClass... parmTypes)
getDeclaredMethod
in class MetaClass
public MetaMethod getBestMatchingMethod(String name, Class... parameters)
getBestMatchingMethod
in class MetaClass
public MetaMethod getBestMatchingMethod(String name, MetaClass... parameters)
getBestMatchingMethod
in class MetaClass
public MetaMethod getBestMatchingStaticMethod(String name, Class... parameters)
getBestMatchingStaticMethod
in class MetaClass
public MetaMethod getBestMatchingStaticMethod(String name, MetaClass... parameters)
getBestMatchingStaticMethod
in class MetaClass
public MetaConstructor getBestMatchingConstructor(Class... parameters)
getBestMatchingConstructor
in class MetaClass
public MetaConstructor getBestMatchingConstructor(MetaClass... parameters)
getBestMatchingConstructor
in class MetaClass
public MetaConstructor getConstructor(Class... parameters)
getConstructor
in class MetaClass
public MetaConstructor getConstructor(MetaClass... parameters)
getConstructor
in class MetaClass
public MetaConstructor getDeclaredConstructor(Class... parameters)
getDeclaredConstructor
in class MetaClass
public MetaField getInheritedField(String name)
MetaClass
The search proceeds as in MetaClass.getField(String)
, but includes all public, protected, default accessibility, and
private fields. Whether a field is static or not does not affect this search.
getInheritedField
in class MetaClass
name
- The name of the field to search for. Not null.public final <A extends Annotation> A getAnnotation(Class<A> annotation)
public final List<MetaMethod> getMethodsAnnotatedWith(Class<? extends Annotation> annotation)
MetaClass
TODO: the returned collection should not include overridden methods from superclasses.
getMethodsAnnotatedWith
in class MetaClass
annotation
- The annotation to scan this class's methods for. Must not be null.public List<MetaMethod> getMethodsWithMetaAnnotations(Class<? extends Annotation> annotation)
getMethodsWithMetaAnnotations
in class MetaClass
public final List<MetaField> getFieldsAnnotatedWith(Class<? extends Annotation> annotation)
MetaClass
getFieldsAnnotatedWith
in class MetaClass
annotation
- The annotation to scan this class's fields for. Must not be null.public List<MetaField> getFieldsWithMetaAnnotations(Class<? extends Annotation> annotation)
getFieldsWithMetaAnnotations
in class MetaClass
public List<MetaParameter> getParametersAnnotatedWith(Class<? extends Annotation> annotation)
getParametersAnnotatedWith
in class MetaClass
public T getEnclosedMetaObject()
public boolean isAssignableFrom(MetaClass clazz)
MetaClass
GivenType given = ...; ThisType a = given;
isAssignableFrom
in class MetaClass
clazz
- The type to check for assignability to this MetaClass's type.public boolean isAssignableTo(MetaClass clazz)
isAssignableTo
in class MetaClass
public boolean isAssignableFrom(Class clazz)
MetaClass
GivenType given = ...; ThisType a = given;
isAssignableFrom
in class MetaClass
clazz
- The type to check for assignability to this MetaClass's type.public boolean isAssignableTo(Class clazz)
isAssignableTo
in class MetaClass
public boolean isDefaultInstantiable()
isDefaultInstantiable
in class MetaClass
public MetaParameterizedType getParameterizedType()
getParameterizedType
in class MetaClass
public MetaParameterizedType getGenericSuperClass()
getGenericSuperClass
in class MetaClass
public boolean isPrimitiveWrapper()
isPrimitiveWrapper
in class MetaClass
public String getInternalName()
getInternalName
in class MetaClass
public BeanDescriptor getBeanDescriptor()
getBeanDescriptor
in class MetaClass
public MetaClass getOuterComponentType()
getOuterComponentType
in class MetaClass
public int hashContent()
hashContent
in class MetaClass
public String hashString()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.