org.apache.bcel.generic

Class FieldOrMethod

public abstract class FieldOrMethod extends CPInstruction implements LoadClass

Super class for InvokeInstruction and FieldInstruction, since they have some methods in common!

Version: $Id: FieldOrMethod.java 152690 2001-10-29 19:59:54Z jvanzyl $

Author: M. Dahm

Constructor Summary
protected FieldOrMethod(short opcode, int index)
Method Summary
StringgetClassName(ConstantPoolGen cpg)
ObjectTypegetClassType(ConstantPoolGen cpg)
ObjectTypegetLoadClassType(ConstantPoolGen cpg)
StringgetName(ConstantPoolGen cpg)
StringgetSignature(ConstantPoolGen cpg)

Constructor Detail

FieldOrMethod

protected FieldOrMethod(short opcode, int index)

Parameters: index to constant pool

Method Detail

getClassName

public String getClassName(ConstantPoolGen cpg)

Returns: name of the referenced class/interface

getClassType

public ObjectType getClassType(ConstantPoolGen cpg)

Returns: type of the referenced class/interface

getLoadClassType

public ObjectType getLoadClassType(ConstantPoolGen cpg)

Returns: type of the referenced class/interface

getName

public String getName(ConstantPoolGen cpg)

Returns: name of referenced method/field.

getSignature

public String getSignature(ConstantPoolGen cpg)

Returns: signature of referenced method/field.