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 FieldGenOrMethodGen

    java.lang.Object
      |
      +--org.apache.bcel.classfile.AccessFlags
            |
            +--org.apache.bcel.generic.FieldGenOrMethodGen

All Implemented Interfaces:
  java.lang.Cloneable, NamedAndTyped, java.io.Serializable

Direct Known Subclasses:
  FieldGen, MethodGen

public abstract class FieldGenOrMethodGen
extends AccessFlags
implements NamedAndTyped, java.lang.Cloneable

Super class for FieldGen and MethodGen objects, since they have some methods in common!

Version:
  $Id: FieldGenOrMethodGen.java,v 1.2 2002/04/24 08:01:36 mdahm Exp $
Author:
  M. Dahm
See Also:
  Serialized Form

Field Summary
`protected ConstantPoolGen` | `cp`
`protected java.lang.String` | `name`
`protected Type` | `type`

Fields inherited from class org.apache.bcel.classfile.AccessFlags
`access_flags`

Constructor Summary
`protected` | `FieldGenOrMethodGen()`

Method Summary
`void` | `addAttribute(Attribute a)` Add an attribute to this method.
`java.lang.Object` | `clone()`
`Attribute[]` | `getAttributes()`
`ConstantPoolGen` | `getConstantPool()`
`java.lang.String` | `getName()`
`abstract java.lang.String` | `getSignature()`
`Type` | `getType()`
`void` | `removeAttribute(Attribute a)` Remove an attribute.
`void` | `removeAttributes()` Remove all attributes.
`void` | `setConstantPool(ConstantPoolGen cp)`
`void` | `setName(java.lang.String name)`
`void` | `setType(Type type)`

Methods inherited from class org.apache.bcel.classfile.AccessFlags
`getAccessFlags, getModifiers, isAbstract, isAbstract, isFinal, isFinal, isInterface, isInterface, isNative, isNative, isPrivate, isPrivate, isProtected, isProtected, isPublic, isPublic, isStatic, isStatic, isStrictfp, isStrictfp, isSynchronized, isSynchronized, isTransient, isTransient, isVolatile, isVolatile, setAccessFlags, setModifiers`

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

Field Detail

### name

    protected java.lang.String name

### type

    protected Type type

### cp

    protected ConstantPoolGen cp

Constructor Detail

### FieldGenOrMethodGen

    protected FieldGenOrMethodGen()

Method Detail

### setType

    public void setType(Type type)

  Specified by:
    `setType` in interface `NamedAndTyped`

### getType

    public Type getType()

  Specified by:
    `getType` in interface `NamedAndTyped`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `NamedAndTyped`
  Returns:
    name of method/field.

### setName

    public void setName(java.lang.String name)

  Specified by:
    `setName` in interface `NamedAndTyped`

### getConstantPool

    public ConstantPoolGen getConstantPool()

### setConstantPool

    public void setConstantPool(ConstantPoolGen cp)

### addAttribute

    public void addAttribute(Attribute a)

  Add an attribute to this method. Currently, the JVM knows about the `Code', `ConstantValue', `Synthetic' and `Exceptions' attributes. Other attributes will be ignored by the JVM but do no harm.

  Parameters:
    `a` - attribute to be added

### removeAttribute

    public void removeAttribute(Attribute a)

  Remove an attribute.

### removeAttributes

    public void removeAttributes()

  Remove all attributes.

### getAttributes

    public Attribute[] getAttributes()

  Returns:
    all attributes of this method.

### getSignature

    public abstract java.lang.String getSignature()

  Returns:
    signature of method/field.

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

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.