Class TypeData

java.lang.Object
javassist.bytecode.stackmap.TypeData
Direct Known Subclasses:
TypeData.AbsTypeVar, TypeData.BasicType, TypeData.ClassName

public abstract class TypeData extends Object
  • Constructor Details

    • TypeData

      protected TypeData()
  • Method Details

    • make

      public static TypeData[] make(int size)
    • setType

      private static void setType(TypeData td, String className, ClassPool cp) throws BadBytecode
      Sets the type name of this object type. If the given type name is a subclass of the current type name, then the given name becomes the name of this object type.
      Parameters:
      className - dot-separated name unless the type is an array type.
      Throws:
      BadBytecode
    • getTypeTag

      public abstract int getTypeTag()
    • getTypeData

      public abstract int getTypeData(ConstPool cp)
    • join

      public TypeData join()
    • isBasicType

      public abstract TypeData.BasicType isBasicType()
      If the type is a basic type, this method normalizes the type and returns a BasicType object. Otherwise, it returns null.
    • is2WordType

      public abstract boolean is2WordType()
    • isNullType

      public boolean isNullType()
      Returns false if getName() returns a valid type name.
    • isUninit

      public boolean isUninit()
    • eq

      public abstract boolean eq(TypeData d)
    • getName

      public abstract String getName()
    • setType

      public abstract void setType(String s, ClassPool cp) throws BadBytecode
      Throws:
      BadBytecode
    • getArrayType

      public abstract TypeData getArrayType(int dim) throws NotFoundException
      Parameters:
      dim - array dimension. It may be negative.
      Throws:
      NotFoundException
    • dfs

      public int dfs(List<TypeData> order, int index, ClassPool cp) throws NotFoundException
      Depth-first search by Tarjan's algorithm
      Parameters:
      order - a node stack in the order in which nodes are visited.
      index - the index used by the algorithm.
      Throws:
      NotFoundException
    • toTypeVar

      protected TypeData.TypeVar toTypeVar(int dim)
      Returns this if it is a TypeVar or a TypeVar that this type depends on. Otherwise, this method returns null. It is used by dfs().
      Parameters:
      dim - dimension
    • constructorCalled

      public void constructorCalled(int offset)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString2

      abstract String toString2(Set<TypeData> set)
    • commonSuperClassEx

      public static CtClass commonSuperClassEx(CtClass one, CtClass two) throws NotFoundException
      Finds the most specific common super class of the given classes by considering array types.
      Throws:
      NotFoundException
    • commonSuperClass

      public static CtClass commonSuperClass(CtClass one, CtClass two) throws NotFoundException
      Finds the most specific common super class of the given classes. This method is a copy from javassist.bytecode.analysis.Type.
      Throws:
      NotFoundException
    • eq

      static boolean eq(CtClass one, CtClass two)
    • aastore

      public static void aastore(TypeData array, TypeData value, ClassPool cp) throws BadBytecode
      Throws:
      BadBytecode