Class MemberEntry

  • Direct Known Subclasses:
    FieldEntry, MethodEntry

    public abstract class MemberEntry
    extends Object
    Abstract base for field and method entries, holding the shared name/descriptor/access state.
    • Constructor Detail

      • MemberEntry

        public MemberEntry()
    • Method Detail

      • getOwnerName

        public String getOwnerName()
        Returns:
        the owner name
      • getName

        public String getName()
        Returns:
        the name
      • getDesc

        public String getDesc()
        Returns:
        the desc
      • getKey

        public String getKey()
        Returns:
        the key
      • getNameIndex

        public int getNameIndex()
        Returns:
        the name index
      • getDescIndex

        public int getDescIndex()
        Returns:
        the desc index
      • getClassFile

        public ClassFile getClassFile()
        Returns:
        the class file
      • getAccess

        public int getAccess()
        Returns:
        the access
      • getAttributes

        public List<Attribute> getAttributes()
        Returns:
        the attributes
      • setOwnerName

        public void setOwnerName​(String ownerName)
        Parameters:
        ownerName - the internal name of the declaring class
      • setName

        public void setName​(String name)
        Parameters:
        name - the member name
      • setDesc

        public void setDesc​(String desc)
        Parameters:
        desc - the member descriptor
      • setKey

        public void setKey​(String key)
        Parameters:
        key - the name+descriptor lookup key
      • setNameIndex

        public void setNameIndex​(int nameIndex)
        Parameters:
        nameIndex - constant-pool index of the name Utf8
      • setDescIndex

        public void setDescIndex​(int descIndex)
        Parameters:
        descIndex - constant-pool index of the descriptor Utf8
      • setClassFile

        public void setClassFile​(ClassFile classFile)
        Parameters:
        classFile - the owning ClassFile
      • setAccess

        public void setAccess​(int access)
        Parameters:
        access - the access flags
      • setAttributes

        public void setAttributes​(List<Attribute> attributes)
        Parameters:
        attributes - the member attributes
      • write

        public abstract void write​(DataOutputStream dos)
                            throws IOException
        Writes this member entry to the output stream.
        Parameters:
        dos - the DataOutputStream to write to
        Throws:
        IOException - if an I/O error occurs