de.grogra.reflect
Class ClassAdapter<T>

java.lang.Object
  extended by de.grogra.reflect.MemberBase
      extended by de.grogra.reflect.TypeImpl<T>
          extended by de.grogra.reflect.ClassAdapter<T>
All Implemented Interfaces:
Member, Type<T>

public final class ClassAdapter<T>
extends TypeImpl<T>


Nested Class Summary
static interface ClassAdapter.ClassLoaderWithPool
           
static class ClassAdapter.URLClassLoaderWithPool
           
 
Field Summary
 
Fields inherited from class de.grogra.reflect.TypeImpl
typeId
 
Fields inherited from class de.grogra.reflect.MemberBase
annots, declaringType, descriptor, modifiers, name
 
Fields inherited from interface de.grogra.reflect.Type
BOOLEAN, BYTE, CHAR, CLASS, DOUBLE, FLOAT, FLOATING_POINT, INT, INTEGRAL, INVALID, LOCAL_CLASS_MODIFIERS, LONG, MEMBER_CLASS_MODIFIERS, MEMBER_INTERFACE_MODIFIERS, NULL, NUMBER, NUMERIC, OBJECT, SHORT, STRING, TOP_LEVEL_CLASS_MODIFIERS, TOP_LEVEL_INTERFACE_MODIFIERS, TYPE, TYPE_0, VOID
 
Fields inherited from interface de.grogra.reflect.Member
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Method Summary
 java.lang.Object createArray(int length)
           
 Type<?> getArrayType()
           
 Annotation getDeclaredAnnotation(int index)
           
 int getDeclaredAnnotationCount()
           
 Field getDeclaredField(int index)
           
 int getDeclaredFieldCount()
           
 Type<?> getDeclaredInterface(int index)
           
 int getDeclaredInterfaceCount()
           
 Method getDeclaredMethod(int index)
           
 int getDeclaredMethodCount()
           
 Type<?> getDeclaredType(int index)
           
 int getDeclaredTypeCount()
           
static java.lang.String getDescriptor(java.lang.Class cls)
           
 java.lang.Class<T> getImplementationClass()
           
 boolean isInstance(java.lang.Object object)
           
 T newInstance()
           
static Type[] wrap(java.lang.Class[] classes, boolean pooled)
           
static
<T> ClassAdapter<T>
wrap(java.lang.Class<T> cls)
           
static
<T> ClassAdapter<T>
wrap(java.lang.Class<T> cls, boolean pooled)
           
 
Methods inherited from class de.grogra.reflect.TypeImpl
cloneObject, getBinaryName, getComponentType, getDefaultElementValue, getLookup, getPackage, getSimpleName, getSupertype, getTypeId, getTypeLoader, isStringSerializable, toString, valueOf
 
Methods inherited from class de.grogra.reflect.MemberBase
getDeclaringType, getDescriptor, getModifiers, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.grogra.reflect.Member
getDeclaringType, getDescriptor, getModifiers, getName
 

Method Detail

createArray

public java.lang.Object createArray(int length)
Specified by:
createArray in interface Type<T>
Overrides:
createArray in class TypeImpl<T>

getArrayType

public Type<?> getArrayType()
Specified by:
getArrayType in interface Type<T>
Overrides:
getArrayType in class TypeImpl<T>

getDeclaredAnnotation

public Annotation getDeclaredAnnotation(int index)
Specified by:
getDeclaredAnnotation in interface Member
Overrides:
getDeclaredAnnotation in class MemberBase

getDeclaredAnnotationCount

public int getDeclaredAnnotationCount()
Specified by:
getDeclaredAnnotationCount in interface Member
Overrides:
getDeclaredAnnotationCount in class MemberBase

getDeclaredField

public Field getDeclaredField(int index)
Specified by:
getDeclaredField in interface Type<T>
Overrides:
getDeclaredField in class TypeImpl<T>

getDeclaredFieldCount

public int getDeclaredFieldCount()
Specified by:
getDeclaredFieldCount in interface Type<T>
Overrides:
getDeclaredFieldCount in class TypeImpl<T>

getDeclaredInterface

public Type<?> getDeclaredInterface(int index)
Specified by:
getDeclaredInterface in interface Type<T>
Overrides:
getDeclaredInterface in class TypeImpl<T>

getDeclaredInterfaceCount

public int getDeclaredInterfaceCount()
Specified by:
getDeclaredInterfaceCount in interface Type<T>
Overrides:
getDeclaredInterfaceCount in class TypeImpl<T>

getDeclaredMethod

public Method getDeclaredMethod(int index)
Specified by:
getDeclaredMethod in interface Type<T>
Overrides:
getDeclaredMethod in class TypeImpl<T>

getDeclaredMethodCount

public int getDeclaredMethodCount()
Specified by:
getDeclaredMethodCount in interface Type<T>
Overrides:
getDeclaredMethodCount in class TypeImpl<T>

getDeclaredType

public Type<?> getDeclaredType(int index)
Specified by:
getDeclaredType in interface Type<T>
Overrides:
getDeclaredType in class TypeImpl<T>

getDeclaredTypeCount

public int getDeclaredTypeCount()
Specified by:
getDeclaredTypeCount in interface Type<T>
Overrides:
getDeclaredTypeCount in class TypeImpl<T>

getDescriptor

public static java.lang.String getDescriptor(java.lang.Class cls)

getImplementationClass

public java.lang.Class<T> getImplementationClass()
Specified by:
getImplementationClass in interface Type<T>
Overrides:
getImplementationClass in class TypeImpl<T>

isInstance

public boolean isInstance(java.lang.Object object)
Specified by:
isInstance in interface Type<T>
Overrides:
isInstance in class TypeImpl<T>

newInstance

public T newInstance()
              throws java.lang.reflect.InvocationTargetException,
                     java.lang.InstantiationException,
                     java.lang.IllegalAccessException
Specified by:
newInstance in interface Type<T>
Overrides:
newInstance in class TypeImpl<T>
Throws:
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
java.lang.IllegalAccessException

wrap

public static Type[] wrap(java.lang.Class[] classes,
                          boolean pooled)

wrap

public static <T> ClassAdapter<T> wrap(java.lang.Class<T> cls)

wrap

public static <T> ClassAdapter<T> wrap(java.lang.Class<T> cls,
                                       boolean pooled)