de.grogra.reflect
Class TypeImpl<T>
java.lang.Object
de.grogra.reflect.MemberBase
de.grogra.reflect.TypeImpl<T>
- All Implemented Interfaces:
- Member, Type<T>
- Direct Known Subclasses:
- BoundedType, ClassAdapter, EnumerationType, IntersectionType, XArray
public class TypeImpl<T>
- extends MemberBase
- implements Type<T>
Field Summary |
protected int |
typeId
|
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 |
Constructor Summary |
protected |
TypeImpl(java.lang.String binaryName,
Type<? super T> superclass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
typeId
protected final int typeId
TypeImpl
protected TypeImpl(java.lang.String binaryName,
Type<? super T> superclass)
cloneObject
public T cloneObject(T o,
boolean deep)
- Specified by:
cloneObject
in interface Type<T>
createArray
public java.lang.Object createArray(int length)
- Specified by:
createArray
in interface Type<T>
getArrayType
public Type<?> getArrayType()
- Specified by:
getArrayType
in interface Type<T>
getBinaryName
public java.lang.String getBinaryName()
- Specified by:
getBinaryName
in interface Type<T>
getComponentType
public Type<?> getComponentType()
- Specified by:
getComponentType
in interface Type<T>
getDeclaredField
public Field getDeclaredField(int index)
- Specified by:
getDeclaredField
in interface Type<T>
getDeclaredFieldCount
public int getDeclaredFieldCount()
- Specified by:
getDeclaredFieldCount
in interface Type<T>
getDeclaredInterface
public Type<?> getDeclaredInterface(int index)
- Specified by:
getDeclaredInterface
in interface Type<T>
getDeclaredInterfaceCount
public int getDeclaredInterfaceCount()
- Specified by:
getDeclaredInterfaceCount
in interface Type<T>
getDeclaredMethod
public Method getDeclaredMethod(int index)
- Specified by:
getDeclaredMethod
in interface Type<T>
getDeclaredMethodCount
public int getDeclaredMethodCount()
- Specified by:
getDeclaredMethodCount
in interface Type<T>
getDeclaredType
public Type<?> getDeclaredType(int index)
- Specified by:
getDeclaredType
in interface Type<T>
getDeclaredTypeCount
public int getDeclaredTypeCount()
- Specified by:
getDeclaredTypeCount
in interface Type<T>
getDefaultElementValue
public java.lang.Object getDefaultElementValue(java.lang.String name)
- Specified by:
getDefaultElementValue
in interface Type<T>
getImplementationClass
public java.lang.Class<T> getImplementationClass()
- Specified by:
getImplementationClass
in interface Type<T>
getLookup
public final Lookup getLookup()
- Specified by:
getLookup
in interface Type<T>
getPackage
public java.lang.String getPackage()
- Specified by:
getPackage
in interface Type<T>
getSimpleName
public java.lang.String getSimpleName()
- Description copied from interface:
Member
- Returns the simple name of this member. This is the single
identifier with which the member is declared in source code,
e.g.,
Object
, out
, println
.
- Specified by:
getSimpleName
in interface Member
- Overrides:
getSimpleName
in class MemberBase
- Returns:
- simple name of the member
getSupertype
public Type<? super T> getSupertype()
- Specified by:
getSupertype
in interface Type<T>
getTypeId
public int getTypeId()
- Description copied from interface:
Type
- Returns the type id of this type.
- Specified by:
getTypeId
in interface Type<T>
- Returns:
- this type's type id
- See Also:
TypeId
getTypeLoader
public TypeLoader getTypeLoader()
- Specified by:
getTypeLoader
in interface Type<T>
isInstance
public boolean isInstance(java.lang.Object object)
- Specified by:
isInstance
in interface Type<T>
isStringSerializable
public boolean isStringSerializable()
- Specified by:
isStringSerializable
in interface Type<T>
newInstance
public T newInstance()
throws java.lang.reflect.InvocationTargetException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
- Specified by:
newInstance
in interface Type<T>
- Throws:
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
java.lang.IllegalAccessException
toString
public java.lang.String toString()
- Overrides:
toString
in class MemberBase
valueOf
public T valueOf(java.lang.String s)
- Specified by:
valueOf
in interface Type<T>