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

## javassist.bytecode
Class ConstantAttribute

    java.lang.Object
      |
      +--javassist.bytecode.AttributeInfo
            |
            +--javassist.bytecode.ConstantAttribute

public class ConstantAttribute
extends AttributeInfo

`ConstantValue_attribute`.

Field Summary
`static java.lang.String` | `tag` The name of this attribute `"ConstantValue"`.

Constructor Summary
`ConstantAttribute(ConstPool cp, int index)` Constructs a ConstantValue attribute.

Method Summary
`AttributeInfo` | `copy(ConstPool newCp, java.util.Map classnames)` Makes a copy.
`int` | `getConstantValue()` Returns `constantvalue_index`.

Methods inherited from class javassist.bytecode.AttributeInfo
`get, getConstPool, getName, length, set`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### tag

    public static final java.lang.String tag

  The name of this attribute `"ConstantValue"`.

  See Also:
    Constant Field Values

Constructor Detail

### ConstantAttribute

    public ConstantAttribute(ConstPool cp,
                             int index)

  Constructs a ConstantValue attribute.

Parameters:
  `cp` - a constant pool table.
  `index` - `constantvalue_index` of `ConstantValue_attribute`.

Method Detail

### getConstantValue

    public int getConstantValue()

  Returns `constantvalue_index`.

### copy

    public AttributeInfo copy(ConstPool newCp,
                              java.util.Map classnames)

  Makes a copy. Class names are replaced according to the given `Map` object.

  Overrides:
    `copy` in class `AttributeInfo`
  Parameters:
    `newCp` - the constant pool table used by the new copy.
    `classnames` - pairs of replaced and substituted class names.

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

Javassist, a Java-bytecode translator toolkit. Copyright (C) 1999-2003 Shigeru Chiba. All Rights Reserved.