public class Field
extends java.lang.Object
ConstantValue
Modifier and Type | Field and Description |
---|---|
protected Attribute[] |
attrs |
protected ClassFile |
clazz |
protected ConstantValue |
constantValue |
protected java.io.DataInputStream |
in |
protected int |
modifiers |
protected int |
name |
protected boolean |
synthetic |
protected int |
type |
Modifier | Constructor and Description |
---|---|
protected |
Field(java.io.DataInputStream in,
ClassFile clazz)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Constant |
constantValue() |
Attribute[] |
getAttrs() |
ClassFile |
getClazz() |
ConstantValue |
getConstantValue() |
double |
getDouble() |
float |
getFloat() |
int |
getInt() |
long |
getLong() |
int |
getModifiers() |
int |
getName() |
java.lang.String |
getString() |
int |
getType() |
void |
initialize() |
boolean |
isConstant() |
boolean |
isString(Type t)
Return true of t is java.lang.String.
|
boolean |
isSynthetic() |
java.lang.String |
name() |
protected java.io.DataInputStream in
protected ClassFile clazz
protected int modifiers
protected int name
protected int type
protected Attribute[] attrs
protected ConstantValue constantValue
protected boolean synthetic
protected Field(java.io.DataInputStream in, ClassFile clazz) throws java.io.IOException
in
- The data stream of the class file.clazz
- The class file containing the field.java.io.IOException
- If an error occurs while reading.public void initialize() throws java.io.IOException
java.io.IOException
public boolean isString(Type t)
public boolean isSynthetic()
public boolean isConstant()
public Constant constantValue()
public int getInt() throws SemanticException
SemanticException
public float getFloat() throws SemanticException
SemanticException
public double getDouble() throws SemanticException
SemanticException
public long getLong() throws SemanticException
SemanticException
public java.lang.String getString() throws SemanticException
SemanticException
public Attribute[] getAttrs()
public ClassFile getClazz()
public ConstantValue getConstantValue()
public int getModifiers()
public int getName()
public int getType()
public java.lang.String name()