Package org.apache.bcel.generic
Class FieldGenOrMethodGen
java.lang.Object
org.apache.bcel.classfile.AccessFlags
org.apache.bcel.generic.FieldGenOrMethodGen
- All Implemented Interfaces:
Serializable
,Cloneable
,NamedAndTyped
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
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList
protected ConstantPoolGen
protected String
protected Type
Fields inherited from class org.apache.bcel.classfile.AccessFlags
access_flags
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.bcel.classfile.AccessFlags
getAccessFlags, getModifiers, isAbstract, isAbstract, isAnnotation, isAnnotation, isEnum, isEnum, isFinal, isFinal, isInterface, isInterface, isNative, isNative, isPrivate, isPrivate, isProtected, isProtected, isPublic, isPublic, isStatic, isStatic, isStrictfp, isStrictfp, isSynchronized, isSynchronized, isSynthetic, isSynthetic, isTransient, isTransient, isVolatile, isVolatile, setAccessFlags, setModifiers
-
Field Details
-
name
-
type
-
cp
-
annotation_vec
-
-
Constructor Details
-
FieldGenOrMethodGen
protected FieldGenOrMethodGen()
-
-
Method Details
-
setType
- Specified by:
setType
in interfaceNamedAndTyped
-
getType
- Specified by:
getType
in interfaceNamedAndTyped
-
getName
- Specified by:
getName
in interfaceNamedAndTyped
- Returns:
- name of method/field.
-
setName
- Specified by:
setName
in interfaceNamedAndTyped
-
getConstantPool
-
setConstantPool
-
addAttribute
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
-
addAnnotationEntry
-
removeAttribute
Remove an attribute. -
removeAnnotationEntry
-
removeAttributes
public void removeAttributes()Remove all attributes. -
removeAnnotationEntries
public void removeAnnotationEntries() -
getAttributes
- Returns:
- all attributes of this method.
-
getAnnotationEntries
-
getSignature
- Returns:
- signature of method/field.
-
clone
-