org.apache.bcel.generic

Class FieldOrMethod

Implemented Interfaces:
Cloneable, IndexedInstruction, LoadClass, Serializable, TypedInstruction

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,v 1.1.1.1 2001/10/29 20:00:13 jvanzyl Exp $
Author:
M. Dahm

Field Summary

Fields inherited from class org.apache.bcel.generic.CPInstruction

index

Fields inherited from class org.apache.bcel.generic.Instruction

length, opcode

Constructor Summary

FieldOrMethod(short opcode, int index)

Method Summary

String
getClassName(ConstantPoolGen cpg)
ObjectType
getClassType(ConstantPoolGen cpg)
ObjectType
getLoadClassType(ConstantPoolGen cpg)
String
getName(ConstantPoolGen cpg)
String
getSignature(ConstantPoolGen cpg)

Methods inherited from class org.apache.bcel.generic.CPInstruction

dump, getIndex, getType, initFromFile, setIndex, toString, toString

Methods inherited from class org.apache.bcel.generic.Instruction

accept, consumeStack, copy, dump, equals, getComparator, getLength, getName, getOpcode, initFromFile, produceStack, readInstruction, setComparator, toString, toString, toString

Constructor Details

FieldOrMethod

protected FieldOrMethod(short opcode,
                        int index)
Parameters:
index - to constant pool

Method Details

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)
Specified by:
getLoadClassType in interface LoadClass
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.