Package org.apache.xbean.finder
Class MetaAnnotatedClass<T>
- java.lang.Object
-
- org.apache.xbean.finder.MetaAnnotatedElement<java.lang.Class<T>>
-
- org.apache.xbean.finder.MetaAnnotatedClass<T>
-
- All Implemented Interfaces:
java.lang.reflect.AnnotatedElement
,Annotated<java.lang.Class<T>>
,MetaAnnotated<java.lang.Class<T>>
public class MetaAnnotatedClass<T> extends MetaAnnotatedElement<java.lang.Class<T>>
- Version:
- $Rev$ $Date$
-
-
Field Summary
-
Fields inherited from class org.apache.xbean.finder.MetaAnnotatedElement
annotations, target
-
-
Constructor Summary
Constructors Constructor Description MetaAnnotatedClass(java.lang.Class<T> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <U> java.lang.Class<? extends U>
asSubclass(java.lang.Class<U> clazz)
T
cast(java.lang.Object obj)
boolean
desiredAssertionStatus()
MetaAnnotatedClass<?>
forName(java.lang.String className)
MetaAnnotatedClass<?>
forName(java.lang.String name, boolean initialize, java.lang.ClassLoader loader)
java.lang.String
getCanonicalName()
MetaAnnotatedClass<?>[]
getClasses()
java.lang.ClassLoader
getClassLoader()
MetaAnnotatedClass<?>
getComponentType()
MetaAnnotatedConstructor<T>
getConstructor(java.lang.Class<?>... parameterTypes)
MetaAnnotatedConstructor<?>[]
getConstructors()
MetaAnnotatedClass<?>[]
getDeclaredClasses()
MetaAnnotatedConstructor<T>
getDeclaredConstructor(java.lang.Class<?>... parameterTypes)
MetaAnnotatedConstructor<?>[]
getDeclaredConstructors()
MetaAnnotatedField
getDeclaredField(java.lang.String name)
MetaAnnotatedField[]
getDeclaredFields()
MetaAnnotatedMethod
getDeclaredMethod(java.lang.String name, java.lang.Class<?>... parameterTypes)
MetaAnnotatedMethod[]
getDeclaredMethods()
MetaAnnotatedClass<?>
getDeclaringClass()
MetaAnnotatedClass<?>
getEnclosingClass()
MetaAnnotatedConstructor<?>
getEnclosingConstructor()
MetaAnnotatedMethod
getEnclosingMethod()
T[]
getEnumConstants()
MetaAnnotatedField
getField(java.lang.String name)
MetaAnnotatedField[]
getFields()
java.lang.reflect.Type[]
getGenericInterfaces()
java.lang.reflect.Type
getGenericSuperclass()
MetaAnnotatedClass<?>[]
getInterfaces()
MetaAnnotatedMethod
getMethod(java.lang.String name, java.lang.Class<?>... parameterTypes)
MetaAnnotatedMethod[]
getMethods()
int
getModifiers()
java.lang.String
getName()
java.lang.Package
getPackage()
java.security.ProtectionDomain
getProtectionDomain()
java.net.URL
getResource(java.lang.String name)
java.io.InputStream
getResourceAsStream(java.lang.String name)
java.lang.Object[]
getSigners()
java.lang.String
getSimpleName()
MetaAnnotatedClass<? super T>
getSuperclass()
java.lang.reflect.TypeVariable<java.lang.Class<T>>[]
getTypeParameters()
boolean
isAnnotation()
boolean
isAnonymousClass()
boolean
isArray()
boolean
isAssignableFrom(java.lang.Class<?> cls)
boolean
isEnum()
boolean
isInstance(java.lang.Object obj)
boolean
isInterface()
boolean
isLocalClass()
boolean
isMemberClass()
boolean
isPrimitive()
boolean
isSynthetic()
T
newInstance()
private MetaAnnotatedClass<?>
to(java.lang.Class<?> clazz)
private MetaAnnotatedClass<?>[]
to(java.lang.Class<?>[] a)
private MetaAnnotatedConstructor<?>
to(java.lang.reflect.Constructor<?> constructor)
private MetaAnnotatedConstructor<?>[]
to(java.lang.reflect.Constructor<?>[] a)
private MetaAnnotatedField
to(java.lang.reflect.Field field)
private MetaAnnotatedField[]
to(java.lang.reflect.Field[] a)
private MetaAnnotatedMethod
to(java.lang.reflect.Method method)
private MetaAnnotatedMethod[]
to(java.lang.reflect.Method[] a)
-
Methods inherited from class org.apache.xbean.finder.MetaAnnotatedElement
equals, get, getAnnotation, getAnnotations, getDeclaredAnnotations, getMetaAnnotations, hashCode, isAnnotationPresent, toString, unroll, unroll, unrollParameters
-
-
-
-
Constructor Detail
-
MetaAnnotatedClass
public MetaAnnotatedClass(java.lang.Class<T> clazz)
-
-
Method Detail
-
forName
public MetaAnnotatedClass<?> forName(java.lang.String className) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
to
private MetaAnnotatedClass<?> to(java.lang.Class<?> clazz)
-
forName
public MetaAnnotatedClass<?> forName(java.lang.String name, boolean initialize, java.lang.ClassLoader loader) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
newInstance
public T newInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException
- Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
-
isInstance
public boolean isInstance(java.lang.Object obj)
-
isAssignableFrom
public boolean isAssignableFrom(java.lang.Class<?> cls)
-
isInterface
public boolean isInterface()
-
isArray
public boolean isArray()
-
isPrimitive
public boolean isPrimitive()
-
isAnnotation
public boolean isAnnotation()
-
isSynthetic
public boolean isSynthetic()
-
getName
public java.lang.String getName()
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
-
getTypeParameters
public java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters()
-
getSuperclass
public MetaAnnotatedClass<? super T> getSuperclass()
-
getGenericSuperclass
public java.lang.reflect.Type getGenericSuperclass()
-
getPackage
public java.lang.Package getPackage()
-
getInterfaces
public MetaAnnotatedClass<?>[] getInterfaces()
-
getGenericInterfaces
public java.lang.reflect.Type[] getGenericInterfaces()
-
getComponentType
public MetaAnnotatedClass<?> getComponentType()
-
getModifiers
public int getModifiers()
-
getSigners
public java.lang.Object[] getSigners()
-
getEnclosingMethod
public MetaAnnotatedMethod getEnclosingMethod()
-
getEnclosingConstructor
public MetaAnnotatedConstructor<?> getEnclosingConstructor()
-
getDeclaringClass
public MetaAnnotatedClass<?> getDeclaringClass()
-
getEnclosingClass
public MetaAnnotatedClass<?> getEnclosingClass()
-
getSimpleName
public java.lang.String getSimpleName()
-
getCanonicalName
public java.lang.String getCanonicalName()
-
isAnonymousClass
public boolean isAnonymousClass()
-
isLocalClass
public boolean isLocalClass()
-
isMemberClass
public boolean isMemberClass()
-
getClasses
public MetaAnnotatedClass<?>[] getClasses()
-
getFields
public MetaAnnotatedField[] getFields() throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
getMethods
public MetaAnnotatedMethod[] getMethods() throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
getConstructors
public MetaAnnotatedConstructor<?>[] getConstructors() throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
getField
public MetaAnnotatedField getField(java.lang.String name) throws java.lang.NoSuchFieldException, java.lang.SecurityException
- Throws:
java.lang.NoSuchFieldException
java.lang.SecurityException
-
getMethod
public MetaAnnotatedMethod getMethod(java.lang.String name, java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException
- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
getConstructor
public MetaAnnotatedConstructor<T> getConstructor(java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException
- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
getDeclaredClasses
public MetaAnnotatedClass<?>[] getDeclaredClasses() throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
getDeclaredFields
public MetaAnnotatedField[] getDeclaredFields() throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
getDeclaredMethods
public MetaAnnotatedMethod[] getDeclaredMethods() throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
getDeclaredConstructors
public MetaAnnotatedConstructor<?>[] getDeclaredConstructors() throws java.lang.SecurityException
- Throws:
java.lang.SecurityException
-
getDeclaredField
public MetaAnnotatedField getDeclaredField(java.lang.String name) throws java.lang.NoSuchFieldException, java.lang.SecurityException
- Throws:
java.lang.NoSuchFieldException
java.lang.SecurityException
-
getDeclaredMethod
public MetaAnnotatedMethod getDeclaredMethod(java.lang.String name, java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException
- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
getDeclaredConstructor
public MetaAnnotatedConstructor<T> getDeclaredConstructor(java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException
- Throws:
java.lang.NoSuchMethodException
java.lang.SecurityException
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String name)
-
getResource
public java.net.URL getResource(java.lang.String name)
-
getProtectionDomain
public java.security.ProtectionDomain getProtectionDomain()
-
desiredAssertionStatus
public boolean desiredAssertionStatus()
-
isEnum
public boolean isEnum()
-
getEnumConstants
public T[] getEnumConstants()
-
cast
public T cast(java.lang.Object obj)
-
asSubclass
public <U> java.lang.Class<? extends U> asSubclass(java.lang.Class<U> clazz)
-
to
private MetaAnnotatedMethod[] to(java.lang.reflect.Method[] a)
-
to
private MetaAnnotatedMethod to(java.lang.reflect.Method method)
-
to
private MetaAnnotatedConstructor<?>[] to(java.lang.reflect.Constructor<?>[] a)
-
to
private MetaAnnotatedConstructor<?> to(java.lang.reflect.Constructor<?> constructor)
-
to
private MetaAnnotatedClass<?>[] to(java.lang.Class<?>[] a)
-
to
private MetaAnnotatedField[] to(java.lang.reflect.Field[] a)
-
to
private MetaAnnotatedField to(java.lang.reflect.Field field)
-
-