Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.reflect
Class XClass<T>

    java.lang.Object
      de.grogra.reflect.XObjectImpl
          de.grogra.reflect.XClass<T>

All Implemented Interfaces:
  Member, Type<T>, XObject

    public class XClass<T>

extends XObjectImpl
implements Type<T>

Field Summary

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, TEXTAREA, 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
`XClass(java.lang.String simpleName, java.lang.String binaryName, int modifiers, Type<?> declaringClass, boolean writable)`

Method Summary
`void` | `addInterface(Type<?> type)`
`T` | `cloneObject(T o, boolean deep)`
`java.lang.Object` | `createArray(int length)`
`XField` | `declareAuxField(java.lang.String name, int modifiers, Type<?> type)`
`XField` | `declareField(java.lang.String name, int modifiers, Type<?> type)`
`void` | `declareMethod(Method method)`
`XField` | `declareSyntheticField(java.lang.String baseName, int modifiers, Type<?> type)`
`void` | `declareType(XClass<?> type)`
`Type<?>` | `getArrayType()`
`java.lang.String` | `getBinaryName()`
`Type<?>` | `getComponentType()`
`Annotation` | `getDeclaredAnnotation(int index)`
`int` | `getDeclaredAnnotationCount()`
`java.util.List<Annotation>` | `getDeclaredAnnotations()`
`Field` | `getDeclaredField(int index)`
`XField` | `getDeclaredField(java.lang.String name)`
`int` | `getDeclaredFieldCount()`
`Type<?>` | `getDeclaredInterface(int index)`
`int` | `getDeclaredInterfaceCount()`
`Method` | `getDeclaredMethod(int index)`
`int` | `getDeclaredMethodCount()`
`Type<?>` | `getDeclaredType(int index)`
`int` | `getDeclaredTypeCount()`
`Type<?>` | `getDeclaringType()` Returns the declaring type of which this is a member.
`java.lang.Object` | `getDefaultElementValue(java.lang.String name)`
`java.lang.String` | `getDescriptor()` Returns a descriptor for this member.
`java.lang.Class<T>` | `getImplementationClass()`
`Lookup` | `getLookup()`
`int` | `getModifiers()` Returns the modifiers of this member as a combination of the bit masks which are defined in this interface.
`java.lang.String` | `getName()` Returns the name of this member.
`java.lang.String` | `getPackage()`
`java.lang.String` | `getSimpleName()` Returns the simple name of this member.
`Type<? super T>` | `getSupertype()`
`int` | `getTypeId()` Returns the type id of this type.
`TypeLoader` | `getTypeLoader()`
`boolean` | `hasSupertypeBeenSet()`
`void` | `initialize()`
`void` | `initSupertype(Type<? super T> superclass)`
`void` | `initTypeLoader(TypeLoader loader)`
`boolean` | `isInstance(java.lang.Object object)`
`boolean` | `isStringSerializable()`
`void` | `makeVisible(XField field)`
`T` | `newInstance()`
`void` | `removeField(Field field)`
`void` | `removeMethod(Method method)`
`void` | `setPublic()`
`java.lang.String` | `toString()`
`protected void` | `updateLookup()`
`T` | `valueOf(java.lang.String s)`

Methods inherited from class de.grogra.reflect.XObjectImpl
`getXClass, getXData, initXClass`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### XClass

    public XClass(java.lang.String simpleName,
                  java.lang.String binaryName,
                  int modifiers,
                  Type<?> declaringClass,
                  boolean writable)

Method Detail

### addInterface

    public void addInterface(Type<?> type)

### 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>`

### declareAuxField

    public XField declareAuxField(java.lang.String name,
                                  int modifiers,
                                  Type<?> type)

### declareField

    public XField declareField(java.lang.String name,
                               int modifiers,
                               Type<?> type)

### declareMethod

    public void declareMethod(Method method)

### declareSyntheticField

    public XField declareSyntheticField(java.lang.String baseName,
                                        int modifiers,
                                        Type<?> type)

### declareType

    public void declareType(XClass<?> type)

### 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>`

### getDeclaredAnnotation

    public Annotation getDeclaredAnnotation(int index)

  Specified by:
    `getDeclaredAnnotation` in interface `Member`

### getDeclaredAnnotationCount

    public int getDeclaredAnnotationCount()

  Specified by:
    `getDeclaredAnnotationCount` in interface `Member`

### getDeclaredAnnotations

    public java.util.List<Annotation> getDeclaredAnnotations()

### getDeclaredField

    public Field getDeclaredField(int index)

  Specified by:
    `getDeclaredField` in interface `Type<T>`

### getDeclaredField

    public XField getDeclaredField(java.lang.String name)

### 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>`

### getDeclaringType

    public Type<?> getDeclaringType()

  Description copied from interface: `Member`
  Returns the declaring type of which this is a member. May be `null` if such a type does not exist.

  Specified by:
    `getDeclaringType` in interface `Member`
  Returns:
    this member's declaring type

### getDefaultElementValue

    public java.lang.Object getDefaultElementValue(java.lang.String name)

  Specified by:
    `getDefaultElementValue` in interface `Type<T>`

### getDescriptor

    public java.lang.String getDescriptor()

  Description copied from interface: `Member`
  Returns a descriptor for this member. Descriptors are constructed as follows:
  - For types, descriptors are defined as for the Java Virtual Machine. For primitive types these are the single characters 'Z', 'B', 'S', 'C', 'I', 'J', 'F', 'D', 'V' for `boolean`, `byte`, `short`, `char`, `int`, `long`, `float`, `double`, `void`. For array types, the descriptor is the character '[' plus the descriptor of its component type, e.g., `[[I` for `int[][]`. For non-array reference types, the descriptor is the character 'L', followed by the binary name (see `Type.getBinaryName()`) of the type, where '.' has to be replaced by '/', followed by ';', e.g., `Ljava/lang/Object;`.
  - For fields, the descriptor is the character 'f', followed by the simple name of the field, followed by the character ';', followed by the descriptor of the field's type. E.g., `fout;Ljava/io/PrintStream;` for the field `System.out`.
  - For methods and constructors, the descriptor is the character 'm', followed by the simple name of the method (which is `<init>` for constructors), followed by the characters ';' and '(', followed by the descriptors of the method's parameter types, followed by ')', followed by the descriptor of the return type. E.g. `mprintln;(Ljava/lang/String;)V` for the method `PrintStream.println(String)`.

  Specified by:
    `getDescriptor` in interface `Member`
  Returns:
    the member's descriptor

### 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>`

### getModifiers

    public int getModifiers()

  Description copied from interface: `Member`
  Returns the modifiers of this member as a combination of the bit masks which are defined in this interface.

  Specified by:
    `getModifiers` in interface `Member`
  Returns:
    modifiers of this member

### getName

    public java.lang.String getName()

  Description copied from interface: `Member`
  Returns the name of this member. For types, this is the canonical name of the type, e.g, `java.lang.Object`, `java.util.Map.Entry`. Otherwise, it equals `Member.getSimpleName()`.

  Specified by:
    `getName` in interface `Member`
  Returns:
    name of the member

### 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`
  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>`

### hasSupertypeBeenSet

    public boolean hasSupertypeBeenSet()

### initialize

    public void initialize()

### initSupertype

    public void initSupertype(Type<? super T> superclass)

### initTypeLoader

    public void initTypeLoader(TypeLoader loader)

### 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>`

### makeVisible

    public void makeVisible(XField field)

### 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`

### removeField

    public void removeField(Field field)

### removeMethod

    public void removeMethod(Method method)

### setPublic

    public void setPublic()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### updateLookup

    protected final void updateLookup()

### valueOf

    public T valueOf(java.lang.String s)

  Specified by:
    `valueOf` in interface `Type<T>`

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD