Class Unknown
java.lang.Object
org.aspectj.apache.bcel.classfile.Attribute
org.aspectj.apache.bcel.classfile.Unknown
- All Implemented Interfaces:
Serializable
,Cloneable
,Node
This class represents a reference to an unknown (i.e., application-specific) attribute of a class. It is instantiated from the
Attribute.readAttribute() method. Applications that need to read in application-specific attributes should create an AttributeReader implementation and attach it via Attribute.addAttributeReader.
- Version:
- $Id: Unknown.java,v 1.6 2009/09/15 19:40:12 aclement Exp $
- Author:
- M. Dahm
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUnknown
(int name_index, int length, byte[] bytes, ConstantPool constant_pool) Create a non-standard attribute.Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.final void
dump
(DataOutputStream file) Dump unknown bytes to file stream.final byte[]
getBytes()
getName()
final void
setBytes
(byte[] bytes) final String
toString()
Methods inherited from class org.aspectj.apache.bcel.classfile.Attribute
getConstantPool, getLength, getNameIndex, getTag, readAttribute
-
Constructor Details
-
Unknown
Initialize from another object. Note that both objects use the same references (shallow copy). Use clone() for a physical copy. -
Unknown
Create a non-standard attribute.- Parameters:
name_index
- Index in constant poollength
- Content length in bytesbytes
- Attribute contentsconstant_pool
- Array of constants
-
-
Method Details
-
accept
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
dump
Dump unknown bytes to file stream.- Overrides:
dump
in classAttribute
- Parameters:
file
- Output file stream- Throws:
IOException
-
getBytes
public final byte[] getBytes()- Returns:
- data bytes.
-
getName
-
setBytes
public final void setBytes(byte[] bytes) - Parameters:
bytes
- .
-
toString
-