Class ConstantRef

java.lang.Object
de.inetsoftware.classparser.ConstantRef
All Implemented Interfaces:
Member
Direct Known Subclasses:
ConstantFieldRef, ConstantInterfaceRef, ConstantMethodRef

public abstract class ConstantRef extends Object implements Member
A reference to an member that is described in the constant pool of a Java class.
  • Field Details

  • Constructor Details

    • ConstantRef

      ConstantRef(ConstantClass constClass, ConstantNameAndType nameAndType)
      Create a new instance.
      Parameters:
      constClass - the class description
      nameAndType - the name and type description
  • Method Details

    • getName

      public String getName()
      The simple name without package
      Specified by:
      getName in interface Member
      Returns:
      the name
    • getClassName

      public String getClassName()
      The class name of the declaring class like "java/lang/Object".
      Specified by:
      getClassName in interface Member
      Returns:
      the class name
    • getType

      public String getType()
      Get the type of the method. For example "(Ljava.lang.String;)I"
      Specified by:
      getType in interface Member
      Returns:
      the type
    • getConstantClass

      public ConstantClass getConstantClass()