Package org.aspectj.apache.bcel.generic
Klasse FieldGen
java.lang.Object
org.aspectj.apache.bcel.classfile.Modifiers
org.aspectj.apache.bcel.generic.FieldGenOrMethodGen
org.aspectj.apache.bcel.generic.FieldGen
Template class for building up a field. The only extraordinary thing one can do is to add a constant value attribute to a field
(which must of course be compatible with the declared type).
- Version:
- $Id: FieldGen.java,v 1.11 2011/10/03 22:41:24 aclement Exp $
- Autor:
- M. Dahm
- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder org.aspectj.apache.bcel.generic.FieldGenOrMethodGen
annotationList, cp, name, type
-
Konstruktorübersicht
KonstruktorBeschreibungFieldGen
(int modifiers, Type type, String name, ConstantPool cpool) Declare a field.FieldGen
(Field field, ConstantPool cp) Instantiate from existing field. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetField()
Get field object after having set up all necessary values.void
setInitialStringValue
(String value) void
setValue
(int index) void
final String
toString()
Return string representation close to declaration format, `public static final short MAX = 100', e.g..void
Von Klasse geerbte Methoden org.aspectj.apache.bcel.generic.FieldGenOrMethodGen
addAnnotation, addAnnotationsAsAttribute, addAttribute, getAnnotations, getAttributes, getAttributesImmutable, getConstantPool, getName, getType, removeAnnotation, removeAnnotations, removeAttribute, removeAttributes, setConstantPool, setName, setType
Von Klasse geerbte Methoden org.aspectj.apache.bcel.classfile.Modifiers
getModifiers, isAbstract, isBridge, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVarargs, isVolatile, setModifiers
-
Konstruktordetails
-
FieldGen
Declare a field. If it is static (isStatic() == true) and has a basic type like int or String it may have an initial value associated with it as defined by setInitValue().- Parameter:
modifiers
- access qualifierstype
- field typename
- field namecpool
- constant pool
-
FieldGen
Instantiate from existing field.- Parameter:
field
- Field objectcp
- constant pool (must contain the same entries as the field's constant pool)
-
-
Methodendetails
-
setValue
public void setValue(int index) -
setValue
-
wipeValue
public void wipeValue() -
getField
Get field object after having set up all necessary values. -
getSignature
- Angegeben von:
getSignature
in KlasseFieldGenOrMethodGen
-
getInitialValue
-
setInitialStringValue
-
toString
Return string representation close to declaration format, `public static final short MAX = 100', e.g..
-