de.fub.bytecode.generic
Class FieldOrMethod
java.lang.Object
|
+--de.fub.bytecode.generic.Instruction
|
+--de.fub.bytecode.generic.CPInstruction
|
+--de.fub.bytecode.generic.FieldOrMethod
- All Implemented Interfaces:
- java.lang.Cloneable, IndexedInstruction, LoadClass, java.io.Serializable, TypedInstruction
- Direct Known Subclasses:
- FieldInstruction, InvokeInstruction
- 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.6 2001/07/11 13:19:04 dahm Exp $
- Author:
- M. Dahm
- See Also:
- Serialized Form
Constructor Summary |
protected |
FieldOrMethod(short opcode,
int index)
|
Methods inherited from class de.fub.bytecode.generic.Instruction |
accept, consumeStack, consumeStack, copy, getLength, getOpcode, getTag, produceStack, produceStack, readInstruction, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FieldOrMethod
protected FieldOrMethod(short opcode,
int index)
- Parameters:
index
- to constant pool
getSignature
public java.lang.String getSignature(ConstantPoolGen cpg)
- Returns:
- signature of referenced method/field.
getName
public java.lang.String getName(ConstantPoolGen cpg)
- Returns:
- name of referenced method/field.
getClassName
public java.lang.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)
- Description copied from interface:
LoadClass
- Returns the ObjectType of the referenced class or interface
that may be loaded and resolved.
- Specified by:
getLoadClassType
in interface LoadClass
- Returns:
- type of the referenced class/interface