Class FieldRefConstant

  • All Implemented Interfaces:
    Printable

    public class FieldRefConstant
    extends Constant
    FieldRef constant.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int TAG
      FieldRef constant tag.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String decodeNameAndDescriptor​(java.lang.String className, java.lang.String name, java.lang.String descriptor, java.lang.String classPackage)  
      void print​(ClassPrinter out, ClassContext context)
      Prints this instance.
      java.lang.String resolveSymbol()
      Resolves the symbol representing this Constant instance.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FieldRefConstant

        public FieldRefConstant​(ClassInfo classInfo,
                                int classIndex,
                                int nameAndTypeIndex)
        Constructs a new FieldRefConstant instance.
        Parameters:
        classInfo - the ClassInfo instance this constant is part of.
        classIndex - the class constant name index.
        nameAndTypeIndex - the referenced name and type index.
    • Method Detail

      • decodeNameAndDescriptor

        protected java.lang.String decodeNameAndDescriptor​(java.lang.String className,
                                                           java.lang.String name,
                                                           java.lang.String descriptor,
                                                           java.lang.String classPackage)
      • print

        public void print​(ClassPrinter out,
                          ClassContext context)
                   throws java.io.IOException
        Description copied from interface: Printable
        Prints this instance.
        Parameters:
        out - the ClassPrinter instance to print to.
        context - the context of this print invocation.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • resolveSymbol

        public java.lang.String resolveSymbol()
                                       throws java.io.IOException
        Description copied from class: Constant
        Resolves the symbol representing this Constant instance.
        Overrides:
        resolveSymbol in class Constant
        Returns:
        the symbol representing this Constant instance.
        Throws:
        java.io.IOException - if the constant cannot be resolved.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object