Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.bcel.generic
Class FieldOrMethod

    java.lang.Object
      |
      +--org.apache.bcel.generic.Instruction
            |
            +--org.apache.bcel.generic.CPInstruction
                  |
                  +--org.apache.bcel.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.1.1.1 2001/10/29 20:00:13 jvanzyl Exp $
Author:
  M. Dahm
See Also:
  Serialized Form

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
`protected` | `FieldOrMethod(short opcode, int index)`

Method Summary
`java.lang.String` | `getClassName(ConstantPoolGen cpg)`
`ObjectType` | `getClassType(ConstantPoolGen cpg)`
`ObjectType` | `getLoadClassType(ConstantPoolGen cpg)` Returns the ObjectType of the referenced class or interface that may be loaded and resolved.
`java.lang.String` | `getName(ConstantPoolGen cpg)`
`java.lang.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, equals, getComparator, getLength, getName, getOpcode, produceStack, readInstruction, setComparator, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.bcel.generic.LoadClass
`getType`

Constructor Detail

### FieldOrMethod

    protected FieldOrMethod(short opcode,
                            int index)

Parameters:
  `index` - to constant pool

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2003 Apache Software Foundation. All Rights Reserved.