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!
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<AnnotationEntryGen> protected ConstantPoolGenprotected Stringprotected TypeFields inherited from class AccessFlags
access_flags -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class 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:
setTypein interfaceNamedAndTyped
-
getType
- Specified by:
getTypein interfaceNamedAndTyped
-
getName
- Specified by:
getNamein interfaceNamedAndTyped- Returns:
- name of method/field.
-
setName
- Specified by:
setNamein 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
-