APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.bcel.internal.classfile

public final Class Record

extends Attribute
Class Inheritance
Imports
java.io.DataInput, .DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.Const, com.sun.org.apache.bcel.internal.util.Args

Extends Attribute and 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

Modifier and TypeField and Description
private RecordComponentInfo[]
private static final RecordComponentInfo[]
Inherited from com.sun.org.apache.bcel.internal.classfile.Attribute:
constant_poolEMPTY_ARRAYlengthname_indextag

Constructor Summary

AccessConstructor and Description
pack-priv
Record(final int
Index in constant pool
nameIndex
,
final int
Content length in bytes
length
,
final DataInput
Input stream
input
,
final ConstantPool
Array of constants
constantPool
)

Constructs object from input stream.

public
Record(final int
Index in constant pool
nameIndex
,
final int
Content length in bytes
length
,
final RecordComponentInfo[]
Array of Record Component Info elements
classes
,
final ConstantPool
Array of constants
constantPool
)

Constructs a new instance using components.

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract com.sun.org.apache.bcel.internal.classfile.Attribute.accept.

Implements com.sun.org.apache.bcel.internal.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.

public Attribute

Returns:

a deep copy of this instance and its components.
copy
(final ConstantPool constantPool)

Implements abstract com.sun.org.apache.bcel.internal.classfile.Attribute.copy.

Copies this instance and its components.

public void
dump(final DataOutputStream
output stream.
file
)

Overrides com.sun.org.apache.bcel.internal.classfile.Attribute.dump.

Dumps this instance into a file stream in binary format.

public RecordComponentInfo[]

Returns:

array of Record Component Info elements.
getComponents
()

Gets all the record components.

private static RecordComponentInfo[]
readComponents(final DataInput input, final ConstantPool constantPool)

public String

Returns:

String a String suitable for debugging.
toString
()

Overrides com.sun.org.apache.bcel.internal.classfile.Attribute.toString.

Converts this instance to a String suitable for debugging.

Inherited from com.sun.org.apache.bcel.internal.classfile.Attribute:
addAttributeReaderclonegetConstantPoolgetLengthgetNamegetNameIndexgetTagprintlnreadAttributereadAttributeremoveAttributeReadersetConstantPoolsetLengthsetNameIndex

Field Detail

componentsback to summary
private RecordComponentInfo[] components
EMPTY_RCI_ARRAYback to summary
private static final RecordComponentInfo[] EMPTY_RCI_ARRAY

Constructor Detail

Recordback to summary
pack-priv Record(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) throws IOException

Constructs object from input stream.

Parameters
nameIndex:int

Index in constant pool

length:int

Content length in bytes

input:DataInput

Input stream

constantPool:ConstantPool

Array of constants

Exceptions
IOException:
if an I/O error occurs.
Recordback to summary
public Record(final int nameIndex, final int length, final RecordComponentInfo[] classes, final ConstantPool constantPool)

Constructs a new instance using components.

Parameters
nameIndex:int

Index in constant pool

length:int

Content length in bytes

classes:RecordComponentInfo[]

Array of Record Component Info elements

constantPool:ConstantPool

Array of constants

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract com.sun.org.apache.bcel.internal.classfile.Attribute.accept.

Implements com.sun.org.apache.bcel.internal.classfile.Node.accept.

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.

Parameters
v:Visitor

Visitor object

Annotations
@Override
copyback to summary
public Attribute copy(final ConstantPool constantPool)

Implements abstract com.sun.org.apache.bcel.internal.classfile.Attribute.copy.

Copies this instance and its components.

Returns:Attribute

a deep copy of this instance and its components.

Annotations
@Override
dumpback to summary
public void dump(final DataOutputStream file) throws IOException

Overrides com.sun.org.apache.bcel.internal.classfile.Attribute.dump.

Dumps this instance into a file stream in binary format.

Parameters
file:DataOutputStream

output stream.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
getComponentsback to summary
public RecordComponentInfo[] getComponents()

Gets all the record components.

Returns:RecordComponentInfo[]

array of Record Component Info elements.

readComponentsback to summary
private static RecordComponentInfo[] readComponents(final DataInput input, final ConstantPool constantPool) throws IOException
toStringback to summary
public String toString()

Overrides com.sun.org.apache.bcel.internal.classfile.Attribute.toString.

Converts this instance to a String suitable for debugging.

Returns:String

String a String suitable for debugging.

Annotations
@Override