Top Description Fields Constructors Methods
org.aspectj.apache.bcel.classfile

public final Class ConstantNameAndType

extends Constant
Class Inheritance
Imports
java.io.DataInputStream, .DataOutputStream, .IOException, org.aspectj.apache.bcel.Constants

This class is derived from the abstract Constant class and represents a reference to the name and signature of a field or method.
Author
M. Dahm
Version
$Id: ConstantNameAndType.java,v 1.5 2009/09/16 00:43:49 aclement Exp $
See Also
Constant

Field Summary

Modifier and TypeField and Description
private int
private int
Inherited from org.aspectj.apache.bcel.classfile.Constant:
tag

Constructor Summary

AccessConstructor and Description
pack-priv
ConstantNameAndType(DataInputStream
Input stream
file
)

Initialize instance from file data.

public
ConstantNameAndType(int
Name of field/method
name_index
,
int
and its signature
signature_index
)

Method Summary

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

Implements abstract org.aspectj.apache.bcel.classfile.Constant.accept.

Implements org.aspectj.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
public final void
dump(DataOutputStream
Output file stream
file
)

Implements abstract org.aspectj.apache.bcel.classfile.Constant.dump.

Dump name and signature index to file stream in binary format.
public final String

Returns:

name
getName
(ConstantPool cp)

public final int

Returns:

Name index in constant pool of field/method name.
getNameIndex
()

public final String

Returns:

signature
getSignature
(ConstantPool cp)

public final int

Returns:

Index in constant pool of field/method signature.
getSignatureIndex
()

public String
public final String
toString()

Overrides org.aspectj.apache.bcel.classfile.Constant.toString.

Returns a string representation of the object.
Inherited from org.aspectj.apache.bcel.classfile.Constant:
clonecopygetTagreadConstant

Field Detail

name_indexback to summary
private int name_index
signature_indexback to summary
private int signature_index

Constructor Detail

ConstantNameAndTypeback to summary
pack-priv ConstantNameAndType(DataInputStream file) throws IOException

Initialize instance from file data.

Parameters
file:DataInputStream

Input stream

ConstantNameAndTypeback to summary
public ConstantNameAndType(int name_index, int signature_index)
Parameters
name_index:int

Name of field/method

signature_index:int

and its signature

Method Detail

acceptback to summary
public void accept(ClassVisitor v)

Implements abstract org.aspectj.apache.bcel.classfile.Constant.accept.

Implements org.aspectj.apache.bcel.classfile.Node.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.

Parameters
v:ClassVisitor

Visitor object

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

Implements abstract org.aspectj.apache.bcel.classfile.Constant.dump.

Dump name and signature index to file stream in binary format.

Parameters
file:DataOutputStream

Output file stream

Annotations
@Override
getNameback to summary
public final String getName(ConstantPool cp)
Returns:String

name

getNameIndexback to summary
public final int getNameIndex()
Returns:int

Name index in constant pool of field/method name.

getSignatureback to summary
public final String getSignature(ConstantPool cp)
Returns:String

signature

getSignatureIndexback to summary
public final int getSignatureIndex()
Returns:int

Index in constant pool of field/method signature.

getValueback to summary
public String getValue()

Implements abstract org.aspectj.apache.bcel.classfile.Constant.getValue.

Annotations
@Override
toStringback to summary
public final String toString()

Overrides org.aspectj.apache.bcel.classfile.Constant.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override