StdFieldpublic final class StdField extends StdMember implements FieldStandard implementation of {@link Field}, which directly stores
all the associated data. |
Constructors Summary |
---|
public StdField(com.android.dexgen.rop.cst.CstType definingClass, int accessFlags, com.android.dexgen.rop.cst.CstNat nat, AttributeList attributes)Constructs an instance.
super(definingClass, accessFlags, nat, attributes);
| public StdField(Field field)Constructs an instance having Java field as its pattern.
this(CstType.intern(field.getDeclaringClass()),
field.getModifiers(),
new CstNat(new CstUtf8(field.getName()),
CstType.intern(field.getType()).getDescriptor()),
new StdAttributeList(0));
| public StdField(Class definingClass, Class type, String name, int modifiers)Constructs an instance taking field description as user-friendly arguments.
this(CstType.intern(definingClass),
modifiers,
new CstNat(new CstUtf8(name), CstType.intern(type).getDescriptor()),
new StdAttributeList(0));
|
Methods Summary |
---|
public com.android.dexgen.rop.cst.TypedConstant | getConstantValue(){@inheritDoc}
AttributeList attribs = getAttributes();
AttConstantValue cval = (AttConstantValue)
attribs.findFirst(AttConstantValue.ATTRIBUTE_NAME);
if (cval == null) {
return null;
}
return cval.getConstantValue();
|
|