Class MemberData<T extends MemberData>

java.lang.Object
org.openjdk.asmtools.jdis.Indenter
org.openjdk.asmtools.jdis.MemberData<T>
All Implemented Interfaces:
Printable
Direct Known Subclasses:
AnnotationData, AnnotationElement, AnnotationElement.AnnotationValue, ClassArrayData, ClassData, CodeData, FieldData, InstructionAttr, MethodData, ModuleData, ParameterAnnotationData, RecordData, RecordData.Component, SignatureData, StackMapData

public abstract class MemberData<T extends MemberData> extends Indenter
Base class for ClassData, MethodData, FieldData and RecordData(JEP 360)
  • Field Details

  • Constructor Details

    • MemberData

      public MemberData(T data)
    • MemberData

      public MemberData(JdisEnvironment environment)
  • Method Details

    • init

      public void init(T data)
    • getConstantPool

      public ConstantPool getConstantPool()
    • handleAttributes

      protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException
      Throws:
      IOException
    • getPseudoFlagsAsString

      protected String getPseudoFlagsAsString()
    • getAnnotationElementState

      public MemberData.AnnotationElementState getAnnotationElementState()
      Gets a state of the annotation element
    • setElementState

      public MemberData setElementState(MemberData.AnnotationElementState state)
      Sets the state of the annotation element
    • getAnnotationsCount

      protected final int getAnnotationsCount()
    • printAnnotations

      protected final void printAnnotations() throws IOException
      Throws:
      IOException
    • printVar

      protected void printVar(StringBuilder prefix, String postfix, int name_cpx, int type_cpx, int value_cpx)
      Prints field or a record component
      Parameters:
      prefix - the field prefix: "private static final Field" or the component prefix: "synthetic Component"
      postfix - String presentation of the initial value if exists ( = String "ABC" )
      name_cpx - Field/Component name cpIndex
      type_cpx - Field/Component type cpIndex
      value_cpx - either cpIndex of an initial value of a field or 0 if it's a component or the field doesn't have an initial value.
    • readAttributes

      protected void readAttributes(DataInputStream in) throws IOException
      Throws:
      IOException