Module xl.compiler

Class ASMType

java.lang.Object
de.grogra.reflect.MemberBase
de.grogra.xl.compiler.ASMType
All Implemented Interfaces:
Member, Type

public class ASMType extends MemberBase implements Type
  • Constructor Details

  • Method Details

    • getTypeLoader

      public TypeLoader getTypeLoader()
      Specified by:
      getTypeLoader in interface Type
    • getTypeId

      public int getTypeId()
      Description copied from interface: Type
      Returns the type id of this type.
      Specified by:
      getTypeId in interface Type
      Returns:
      this type's type id
      See Also:
    • getPackage

      public String getPackage()
      Specified by:
      getPackage in interface Type
    • getBinaryName

      public String getBinaryName()
      Specified by:
      getBinaryName in interface Type
    • isInstance

      public boolean isInstance(Object object)
      Specified by:
      isInstance in interface Type
    • getImplementationClass

      public Class getImplementationClass()
      Specified by:
      getImplementationClass in interface Type
    • getSupertype

      public Type getSupertype()
      Specified by:
      getSupertype in interface Type
    • getDeclaredInterfaceCount

      public int getDeclaredInterfaceCount()
      Specified by:
      getDeclaredInterfaceCount in interface Type
    • getDeclaredInterface

      public Type getDeclaredInterface(int index)
      Specified by:
      getDeclaredInterface in interface Type
    • getDeclaredFieldCount

      public int getDeclaredFieldCount()
      Specified by:
      getDeclaredFieldCount in interface Type
    • getDeclaredField

      public Field getDeclaredField(int index)
      Specified by:
      getDeclaredField in interface Type
    • getDeclaredTypeCount

      public int getDeclaredTypeCount()
      Specified by:
      getDeclaredTypeCount in interface Type
    • getDeclaredType

      public Type getDeclaredType(int index)
      Specified by:
      getDeclaredType in interface Type
    • getDeclaredMethodCount

      public int getDeclaredMethodCount()
      Specified by:
      getDeclaredMethodCount in interface Type
    • getDeclaredMethod

      public Method getDeclaredMethod(int index)
      Specified by:
      getDeclaredMethod in interface Type
    • getComponentType

      public Type getComponentType()
      Specified by:
      getComponentType in interface Type
    • getArrayType

      public Type getArrayType()
      Specified by:
      getArrayType in interface Type
    • createArray

      public Object createArray(int length)
      Specified by:
      createArray in interface Type
    • cloneObject

      public Object cloneObject(Object o, boolean deep) throws CloneNotSupportedException
      Specified by:
      cloneObject in interface Type
      Throws:
      CloneNotSupportedException
    • isStringSerializable

      public boolean isStringSerializable()
      Specified by:
      isStringSerializable in interface Type
    • valueOf

      public Object valueOf(String s)
      Specified by:
      valueOf in interface Type
    • newInstance

      Specified by:
      newInstance in interface Type
      Throws:
      InvocationTargetException
      InstantiationException
      IllegalAccessException
    • getDefaultElementValue

      public Object getDefaultElementValue(String name)
      Specified by:
      getDefaultElementValue in interface Type
    • getLookup

      public final Lookup getLookup()
      Specified by:
      getLookup in interface Type
    • getSimpleName

      public 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
    • getDescriptor

      public 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
      Overrides:
      getDescriptor in class MemberBase
      Returns:
      the member's descriptor
    • toString

      public String toString()
      Overrides:
      toString in class MemberBase