Class Attribute

    • Method Detail

      • doWrite

        protected void doWrite​(java.io.DataOutputStream dos)
                        throws java.io.IOException
        Specified by:
        doWrite in class ClassFileEntry
        Throws:
        java.io.IOException
      • getLength

        protected abstract int getLength()
      • getLengthIncludingHeader

        protected int getLengthIncludingHeader()
        Answer the length of the receiver including its header (the u2 for the attribute name and the u4 for the attribute length). This is relevant when attributes are nested within other attributes - the outer attribute needs to take the inner attribute headers into account when calculating its length.
        Returns:
        int adjusted length
      • hasBCIRenumbering

        public boolean hasBCIRenumbering()
        Answer true if the receiver needs to have BCI renumbering applied to it; otherwise answer false.
        Returns:
        boolean BCI renumbering required
      • isSourceFileAttribute

        public boolean isSourceFileAttribute()
        Answer true if the receiver is a source file attribute (which gets special handling when the class is built); otherwise answer false.
        Returns:
        boolean source file attribute
      • writeBody

        protected abstract void writeBody​(java.io.DataOutputStream dos)
                                   throws java.io.IOException
        Throws:
        java.io.IOException