Class ClassConstant

java.lang.Object
classycle.classfile.Constant
classycle.classfile.ClassConstant

public class ClassConstant extends Constant
Class constant. Refers to an instance of UTF8Constant which holds the fully qualifies class name.
Author:
Franz-Josef Elmer
  • Constructor Details

    • ClassConstant

      public ClassConstant(Constant[] pool, int nameIndex)
      Creates an instance for the specified index refering an UTF8Constant.
      Parameters:
      pool - Pool of all Constants.
      nameIndex - Index into pool.
  • Method Details

    • getName

      public String getName()
      Returns the fully-qualified class name. In the case of an object array only the class name of the object is returned.
      Returns:
      fully-qualified class name in standard notation with '.'.
    • toString

      public String toString()
      Returns the constant type and the class name.
      Overrides:
      toString in class Object