org.apache.bcel.generic

Class FieldGenOrMethodGen

public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAndTyped, Cloneable

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

Version: $Id: FieldGenOrMethodGen.java 420672 2006-07-11 01:57:19Z tcurdt $

Author: M. Dahm

Field Summary
protected ArrayListannotation_vec
protected ConstantPoolGencp
protected Stringname
protected Typetype
Constructor Summary
protected FieldGenOrMethodGen()
Method Summary
voidaddAnnotationEntry(AnnotationEntryGen ag)
voidaddAttribute(Attribute a)
Add an attribute to this method.
Objectclone()
AnnotationEntryGen[]getAnnotationEntries()
Attribute[]getAttributes()
ConstantPoolGengetConstantPool()
StringgetName()
abstract StringgetSignature()
TypegetType()
voidremoveAnnotationEntries()
voidremoveAnnotationEntry(AnnotationEntryGen ag)
voidremoveAttribute(Attribute a)
Remove an attribute.
voidremoveAttributes()
Remove all attributes.
voidsetConstantPool(ConstantPoolGen cp)
voidsetName(String name)
voidsetType(Type type)

Field Detail

annotation_vec

protected ArrayList annotation_vec

cp

protected ConstantPoolGen cp

name

protected String name

type

protected Type type

Constructor Detail

FieldGenOrMethodGen

protected FieldGenOrMethodGen()

Method Detail

addAnnotationEntry

public void addAnnotationEntry(AnnotationEntryGen ag)

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

clone

public Object clone()

getAnnotationEntries

public AnnotationEntryGen[] getAnnotationEntries()

getAttributes

public Attribute[] getAttributes()

Returns: all attributes of this method.

getConstantPool

public ConstantPoolGen getConstantPool()

getName

public String getName()

Returns: name of method/field.

getSignature

public abstract String getSignature()

Returns: signature of method/field.

getType

public Type getType()

removeAnnotationEntries

public void removeAnnotationEntries()

removeAnnotationEntry

public void removeAnnotationEntry(AnnotationEntryGen ag)

removeAttribute

public void removeAttribute(Attribute a)
Remove an attribute.

removeAttributes

public void removeAttributes()
Remove all attributes.

setConstantPool

public void setConstantPool(ConstantPoolGen cp)

setName

public void setName(String name)

setType

public void setType(Type type)
Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.