Package org.apache.bcel.generic
Class FieldGenOrMethodGen
java.lang.Object
org.apache.bcel.classfile.AccessFlags
org.apache.bcel.generic.FieldGenOrMethodGen
- All Implemented Interfaces:
Cloneable
,NamedAndTyped
Super class for FieldGen and MethodGen objects, since they have
some methods in common!
-
Field Summary
Modifier and TypeFieldDescriptionprotected ConstantPoolGen
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setterprotected String
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setterprotected Type
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setterFields inherited from class org.apache.bcel.classfile.AccessFlags
access_flags
-
Constructor Summary
-
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, isVarArgs, isVarArgs, isVolatile, isVolatile, setAccessFlags, setModifiers
-
Field Details
-
name
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setter -
type
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setter -
cp
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setter
-
-
Constructor Details
-
FieldGenOrMethodGen
protected FieldGenOrMethodGen() -
FieldGenOrMethodGen
protected FieldGenOrMethodGen(int access_flags) - Since:
- 6.0
-
-
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
- Since:
- 6.0
-
removeAttribute
Remove an attribute. -
removeAnnotationEntry
- Since:
- 6.0
-
removeAttributes
public void removeAttributes()Remove all attributes. -
removeAnnotationEntries
public void removeAnnotationEntries()- Since:
- 6.0
-
getAttributes
- Returns:
- all attributes of this method.
-
getAnnotationEntries
-
getSignature
- Returns:
- signature of method/field.
-
clone
-