Class MemberInfo

java.lang.Object
org.fife.rsta.ac.java.classreader.MemberInfo
Direct Known Subclasses:
FieldInfo, MethodInfo

public abstract class MemberInfo extends Object
Base class for information about members (fields and methods).
Version:
1.0
See Also:
  • Field Details

    • cf

      protected ClassFile cf
      The class file in which this method is defined.
    • accessFlags

      private int accessFlags
      A mask of flags used to denote access permission to and properties of this method.
    • deprecated

      private boolean deprecated
      Whether this member is deprecated.
    • DEPRECATED

      public static final String DEPRECATED
      Attribute marking a member as deprecated.
      See Also:
    • SIGNATURE

      public static final String SIGNATURE
      Attribute containing index of the member's signature.
      See Also:
    • RUNTIME_VISIBLE_ANNOTATIONS

      public static final String RUNTIME_VISIBLE_ANNOTATIONS
      Attribute containing runtime-visible annotations.
      See Also:
  • Constructor Details

    • MemberInfo

      protected MemberInfo(ClassFile cf, int accessFlags)
      Constructor.
      Parameters:
      cf - The class file defining this member.
  • Method Details

    • getAccessFlags

      public int getAccessFlags()
      Returns the access flags for this field.
      Returns:
      The access flags, as a bit field.
      See Also:
    • getClassFile

      public ClassFile getClassFile()
      Returns the parent class file.
      Returns:
      The parent class file.
    • getName

      public abstract String getName()
      Returns the name of this member.
      Returns:
      The name of this member.
    • isDeprecated

      public boolean isDeprecated()
      Returns whether this member is deprecated.
      Returns:
      Whether this member is deprecated.
    • getDescriptor

      public abstract String getDescriptor()
      Returns the descriptor of this member.
      Returns:
      The descriptor of this member.
    • isFinal

      public boolean isFinal()
      Returns whether this member is final.
      Returns:
      Whether this member is final.
    • isStatic

      public boolean isStatic()
      Returns whether this member is static.
      Returns:
      Whether this member is static.
    • readAttribute

      protected AttributeInfo readAttribute(DataInputStream in, String attrName, int attrLength) throws IOException
      Reads attributes common to all members. If the specified attribute is not common to members, the attribute returned is an "unsupported" attribute.
      Parameters:
      in - The input stream to read from.
      attrName - The attribute name.
      attrLength - The attribute length.
      Returns:
      The attribute, or null if it was purposely skipped for some reason (known to be useless for our purposes, etc.).
      Throws:
      IOException - If an IO error occurs.