Class DE.fub.inf.JVM.ClassGen.FieldGen
java.lang.Object
|
+--DE.fub.inf.JVM.ClassGen.FieldGen
- public final class FieldGen
- extends java.lang.Object
- implements Constants
Template class for building up a field. The only reasonable thing
one can do is a constant value attribute to a field which must of
course be compatible with to the declared type.
- Version:
- $Id: FieldGen.java,v 1.2 1998/09/18 09:21:03 dahm Exp $
- Author:
- M. Dahm
- See Also:
- Field
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
FieldGen
public FieldGen(int access_flags,
Type type,
java.lang.String name,
ConstantPoolGen cp)
- Declare a field. If it is a static field (access_flags & ACC_STATIC != 0) it
may have an initial value associated with it as defined by setInitValue().
- Parameters:
access_flags
- access qualifiers
type
- field type
name
- field name
cp
- constant pool
setInitValue
public void setInitValue(java.lang.String str)
- Set (optional) initial value of field, otherwise it will be set to null/0/false
by the JVM automatically.
setInitValue
public void setInitValue(long l)
setInitValue
public void setInitValue(int i)
setInitValue
public void setInitValue(short s)
setInitValue
public void setInitValue(char c)
setInitValue
public void setInitValue(byte b)
setInitValue
public void setInitValue(boolean b)
setInitValue
public void setInitValue(float f)
setInitValue
public void setInitValue(double d)
getField
public Field getField()
- Get method object.
setType
public void setType(Type type)
getType
public Type getType()
setName
public void setName(java.lang.String name)
getName
public java.lang.String getName()