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 FieldInfo

    java.lang.Object
      |
      +--javassist.bytecode.FieldInfo

public final class FieldInfo
extends java.lang.Object

`field_info` structure.

See Also:
  `CtField.getFieldInfo()`

Constructor Summary
`FieldInfo(ConstPool cp, java.lang.String fieldName, java.lang.String desc)` Constructs a `field_info` structure.

Method Summary
`void` | `addAttribute(AttributeInfo info)` Appends an attribute.
`int` | `getAccessFlags()` Returns the access flags.
`AttributeInfo` | `getAttribute(java.lang.String name)` Returns the attribute with the specified name.
`java.util.List` | `getAttributes()` Returns all the attributes.
`ConstPool` | `getConstPool()` Returns the constant pool table used by this `field_info`.
`java.lang.String` | `getDescriptor()` Returns the field descriptor.
`java.lang.String` | `getName()` Returns the field name.
`void` | `setAccessFlags(int acc)` Sets the access flags.
`void` | `setDescriptor(java.lang.String desc)` Sets the field descriptor.
`void` | `setName(java.lang.String newName)` Sets the field name.

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

Constructor Detail

### FieldInfo

    public FieldInfo(ConstPool cp,
                     java.lang.String fieldName,
                     java.lang.String desc)

  Constructs a `field_info` structure.

Parameters:
  `cp` - a constant pool table
  `fieldName` - field name
  `desc` - field descriptor
See Also:
  `Descriptor`

Method Detail

### getConstPool

    public ConstPool getConstPool()

  Returns the constant pool table used by this `field_info`.

### getName

    public java.lang.String getName()

  Returns the field name.

### setName

    public void setName(java.lang.String newName)

  Sets the field name.

### getAccessFlags

    public int getAccessFlags()

  Returns the access flags.

  See Also:
    `AccessFlag`

### setAccessFlags

    public void setAccessFlags(int acc)

  Sets the access flags.

  See Also:
    `AccessFlag`

### getDescriptor

    public java.lang.String getDescriptor()

  Returns the field descriptor.

  See Also:
    `Descriptor`

### setDescriptor

    public void setDescriptor(java.lang.String desc)

  Sets the field descriptor.

  See Also:
    `Descriptor`

### getAttributes

    public java.util.List getAttributes()

  Returns all the attributes.

  Returns:
    a list of `AttributeInfo` objects.
  See Also:
    `AttributeInfo`

### getAttribute

    public AttributeInfo getAttribute(java.lang.String name)

  Returns the attribute with the specified name.

  Parameters:
    `name` - attribute name

### addAttribute

    public void addAttribute(AttributeInfo info)

  Appends an attribute. If there is already an attribute with the same name, the new one substitutes for it.

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.