Package org.apache.bcel.classfile
Class Record
- java.lang.Object
-
- org.apache.bcel.classfile.Attribute
-
- org.apache.bcel.classfile.Record
-
- All Implemented Interfaces:
java.lang.Cloneable,Node
public final class Record extends Attribute
ExtendsAttributeand records the classes and interfaces that are authorized to claim membership in the nest hosted by the current class or interface. There may be at most one Record attribute in a ClassFile structure.- Since:
- 6.9.0
- See Also:
Attribute
-
-
Field Summary
Fields Modifier and Type Field Description private RecordComponentInfo[]componentsprivate static RecordComponentInfo[]EMPTY_RCI_ARRAY-
Fields inherited from class org.apache.bcel.classfile.Attribute
constant_pool, EMPTY_ARRAY, length, name_index, tag
-
-
Constructor Summary
Constructors Constructor Description Record(int nameIndex, int length, java.io.DataInput input, ConstantPool constantPool)Constructs object from input stream.Record(int nameIndex, int length, RecordComponentInfo[] classes, ConstantPool constantPool)Constructs a new instance using components.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor v)Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.Attributecopy(ConstantPool constantPool)Copies this instance and its components.voiddump(java.io.DataOutputStream file)Dumps this instance into a file stream in binary format.RecordComponentInfo[]getComponents()Gets all the record components.private static RecordComponentInfo[]readComponents(java.io.DataInput input, ConstantPool constantPool)java.lang.StringtoString()Converts this instance to a String suitable for debugging.-
Methods inherited from class org.apache.bcel.classfile.Attribute
addAttributeReader, addAttributeReader, clone, getConstantPool, getLength, getName, getNameIndex, getTag, println, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex
-
-
-
-
Field Detail
-
EMPTY_RCI_ARRAY
private static final RecordComponentInfo[] EMPTY_RCI_ARRAY
-
components
private RecordComponentInfo[] components
-
-
Constructor Detail
-
Record
Record(int nameIndex, int length, java.io.DataInput input, ConstantPool constantPool) throws java.io.IOExceptionConstructs object from input stream.- Parameters:
nameIndex- Index in constant pool.length- Content length in bytes.input- Input stream.constantPool- Array of constants.- Throws:
java.io.IOException- if an I/O error occurs.
-
Record
public Record(int nameIndex, int length, RecordComponentInfo[] classes, ConstantPool constantPool)Constructs a new instance using components.- Parameters:
nameIndex- Index in constant pool.length- Content length in bytes.classes- Array of Record Component Info elements.constantPool- Array of constants.
-
-
Method Detail
-
readComponents
private static RecordComponentInfo[] readComponents(java.io.DataInput input, ConstantPool constantPool) throws java.io.IOException
- Throws:
java.io.IOException
-
accept
public void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. For example, the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
-
copy
public Attribute copy(ConstantPool constantPool)
Copies this instance and its components.
-
dump
public void dump(java.io.DataOutputStream file) throws java.io.IOExceptionDumps this instance into a file stream in binary format.
-
getComponents
public RecordComponentInfo[] getComponents()
Gets all the record components.- Returns:
- array of Record Component Info elements.
-
-