Class Attribute
java.lang.Object
org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
org.apache.commons.compress.harmony.unpack200.bytecode.Attribute
- Direct Known Subclasses:
AnnotationsAttribute
,BCIRenumberedAttribute
,ConstantValueAttribute
,DeprecatedAttribute
,EnclosingMethodAttribute
,ExceptionsAttribute
,InnerClassesAttribute
,SignatureAttribute
,SourceFileAttribute
Abstract superclass for class file attributes
-
Field Summary
Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
NONE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doWrite
(DataOutputStream dos) boolean
protected CPUTF8
protected abstract int
protected int
Answer the length of the receiver including its header (the u2 for the attribute name and the u4 for the attribute length).protected ClassFileEntry[]
boolean
Answer true if the receiver needs to have BCI renumbering applied to it; otherwise answer false.int
hashCode()
boolean
Answer true if the receiver is a source file attribute (which gets special handling when the class is built); otherwise answer false.protected void
resolve
(ClassConstantPool pool) Allows the constant pool entries to resolve their nested entries.protected abstract void
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
objectHashCode, toString, write
-
Field Details
-
attributeName
-
-
Constructor Details
-
Attribute
-
-
Method Details
-
doWrite
- Specified by:
doWrite
in classClassFileEntry
- Throws:
IOException
-
equals
- Specified by:
equals
in classClassFileEntry
-
getAttributeName
-
getLength
-
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
-
getNestedClassFileEntries
- Overrides:
getNestedClassFileEntries
in classClassFileEntry
-
hasBCIRenumbering
Answer true if the receiver needs to have BCI renumbering applied to it; otherwise answer false.- Returns:
- boolean BCI renumbering required
-
hashCode
- Specified by:
hashCode
in classClassFileEntry
-
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
-
resolve
Description copied from class:ClassFileEntry
Allows the constant pool entries to resolve their nested entries.- Overrides:
resolve
in classClassFileEntry
- Parameters:
pool
- TODO
-
writeBody
- Throws:
IOException
-