org.apache.bcel.generic

## Class NameSignatureInstruction

- java.lang.Object
- - org.apache.bcel.generic.Instruction
  - - org.apache.bcel.generic.CPInstruction
    - - org.apache.bcel.generic.NameSignatureInstruction

- All Implemented Interfaces:
    Cloneable, IndexedInstruction, TypedInstruction

      public abstract class NameSignatureInstruction
      extends CPInstruction

  Super class for FieldOrMethod and INVOKEDYNAMIC, since they both have names and signatures
  Since:
    6.0
  Version:
    $Id: FieldOrMethod.java 1481383 2013-05-11 17:34:32Z dbrosius $

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

    Constructors
    Constructor and Description
    `NameSignatureInstruction()`
    `NameSignatureInstruction(short opcode, int index)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName(ConstantPoolGen cpg)`
    `ConstantNameAndType` | `getNameAndType(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, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NameSignatureInstruction

          public NameSignatureInstruction()

    - #### NameSignatureInstruction

          public NameSignatureInstruction(short opcode,
                                          int index)

  - ### Method Detail

    - #### getNameAndType

          public ConstantNameAndType getNameAndType(ConstantPoolGen cpg)

    - #### getSignature

          public String getSignature(ConstantPoolGen cpg)

      Returns:
        signature of referenced method/field.

    - #### getName

          public String getName(ConstantPoolGen cpg)

      Returns:
        name of referenced method/field.

Copyright © 2004–2017 The Apache Software Foundation. All rights reserved.