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

## javassist
Class CtMember

    java.lang.Object
      |
      +--javassist.CtMember

Direct Known Subclasses:
  CtBehavior, CtField

public abstract class CtMember
extends java.lang.Object

An instance of `CtMember` represents a field, a constructor, or a method.

Method Summary
`abstract byte[]` | `getAttribute(java.lang.String name)` Obtains an attribute with the given name.
`CtClass` | `getDeclaringClass()` Returns the class that declares this member.
`abstract int` | `getModifiers()` Obtains the modifiers of the member.
`abstract java.lang.String` | `getName()` Obtains the name of the member.
`abstract void` | `setAttribute(java.lang.String name, byte[] data)` Adds an attribute.
`abstract void` | `setModifiers(int mod)` Sets the encoded modifiers of the member.

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

Method Detail

### getDeclaringClass

    public CtClass getDeclaringClass()

  Returns the class that declares this member.

### getModifiers

    public abstract int getModifiers()

  Obtains the modifiers of the member.

  Returns:
    modifiers encoded with `javassist.Modifier`.
  See Also:
    `Modifier`

### setModifiers

    public abstract void setModifiers(int mod)

  Sets the encoded modifiers of the member.

  See Also:
    `Modifier`

### getName

    public abstract java.lang.String getName()

  Obtains the name of the member.

### getAttribute

    public abstract byte[] getAttribute(java.lang.String name)

  Obtains an attribute with the given name. If that attribute is not found in the class file, this method returns null.

  Parameters:
    `name` - attribute name

### setAttribute

    public abstract void setAttribute(java.lang.String name,
                                      byte[] data)

  Adds an attribute. The attribute is saved in the class file.

  Parameters:
    `name` - attribute name
    `data` - attribute value

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.