Package serp.bytecode
Class UnknownAttribute
java.lang.Object
serp.bytecode.Attributes
serp.bytecode.Attribute
serp.bytecode.UnknownAttribute
- All Implemented Interfaces:
BCEntity,VisitAcceptor
An unrecognized attribute; class files are allowed to contain
attributes that are not recognized, and the JVM must ignore them.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptVisit(BCVisitor visit) Accept a visit from aBCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this one.(package private) intReturn the length of the bytecode representation of this attribute in bytes, excluding the name index.byte[]getValue()The value is of unknown content, so it is stored as a byte array.(package private) voidRead the attribute bytecode from the given stream, up to length bytes, excluding the name index.(package private) voidCopy the information from the given attribute to this one.voidsetValue(byte[] value) The value is of unknown content, so it is stored as a byte array.(package private) voidwrite(DataOutput out, int length) Write the attribute bytecode to the given stream, up to length bytes, excluding the name index.Methods inherited from class serp.bytecode.Attribute
create, getAttributesHolder, getClassLoader, getName, getNameIndex, getOwner, getPool, getProject, invalidate, isValidMethods inherited from class serp.bytecode.Attributes
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, readAttributes, removeAttribute, removeAttribute, setAttributes, visitAttributes, writeAttributes
-
Field Details
-
_value
private byte[] _value
-
-
Constructor Details
-
UnknownAttribute
UnknownAttribute(int nameIndex, Attributes owner)
-
-
Method Details
-
getLength
int getLength()Description copied from class:AttributeReturn the length of the bytecode representation of this attribute in bytes, excluding the name index. -
getValue
public byte[] getValue()The value is of unknown content, so it is stored as a byte array. -
setValue
public void setValue(byte[] value) The value is of unknown content, so it is stored as a byte array. -
acceptVisit
Description copied from interface:VisitAcceptorAccept a visit from aBCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this one. -
read
Description copied from class:AttributeCopy the information from the given attribute to this one. Does nothing by default. -
read
Description copied from class:AttributeRead the attribute bytecode from the given stream, up to length bytes, excluding the name index. Does nothing by default.- Overrides:
readin classAttribute- Throws:
IOException
-
write
Description copied from class:AttributeWrite the attribute bytecode to the given stream, up to length bytes, excluding the name index. Does nothing by default.- Overrides:
writein classAttribute- Throws:
IOException
-