Interface IDexField
- All Superinterfaces:
ICodeField,ICodeItem,IDexItem
This interface represents a Dex
field_id_item object, that is, a reference to an
internal or external field used in the dex. Retrieved via IDexUnit.-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
FLAG_ABSTRACT, FLAG_ANNOTATION, FLAG_ANONYMOUS, FLAG_ARTIFICIAL, FLAG_BRIDGE, FLAG_CONSTRUCTOR, FLAG_DECLARED_SYNCHRONIZED, FLAG_DESTRUCTOR, FLAG_ENUM, FLAG_FINAL, FLAG_INNER, FLAG_INTERFACE, FLAG_INTERNAL, FLAG_NATIVE, FLAG_PRIVATE, FLAG_PROTECTED, FLAG_PUBLIC, FLAG_STATIC, FLAG_STRICT, FLAG_SYNCHRONIZED, FLAG_SYNTHETIC, FLAG_TRANSIENT, FLAG_VARARGS, FLAG_VIRTUAL, FLAG_VOLATILE -
Method Summary
Modifier and TypeMethodDescriptionGet the type of the class holding this field.intGet the containing class type index.getClassTypeSignature(boolean effective) Get the containing class type signature.getData()Get a reference to the field definition, if the field is internal.Get the field's type.intGet the field type index.getFieldTypeSignature(boolean effective) Get the field type signature.intgetIndex()Get the index of this item in the Dex file's field list.getName(boolean effective) Get the name for this field.intGet the field name index.getSignature(boolean effective) Get the signature for this field.getSignature(boolean effective, boolean internal) Get the item signature.getSignature(boolean effective, boolean internal, boolean includeFieldType) Get the signature for this field.getSignature(boolean effective, boolean internal, boolean includeFieldType, boolean qualifiedNames) Get the signature for this field.Retrieve the initial value of this field if it is a static final class field.booleanRename this field.booleanRename this field.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.ICodeItem
getAddress, getAddress, getGenericFlags, getItemId, getName, getSignature, isArtificial, isInternal
-
Method Details
-
getIndex
int getIndex()Get the index of this item in the Dex file's field list. -
getData
IDexFieldData getData()Get a reference to the field definition, if the field is internal.- Returns:
- the field data, null for external fields
-
getClassType
IDexType getClassType()Description copied from interface:ICodeFieldGet the type of the class holding this field.- Specified by:
getClassTypein interfaceICodeField- Returns:
- owning class type
-
getClassTypeIndex
int getClassTypeIndex()Get the containing class type index.- Returns:
- the class type index
-
getClassTypeSignature
Get the containing class type signature.- Parameters:
effective- true to use the effective signature, false to use the original signature- Returns:
- the class type signature
-
getFieldType
IDexType getFieldType()Description copied from interface:ICodeFieldGet the field's type.- Specified by:
getFieldTypein interfaceICodeField- Returns:
- field type
-
getFieldTypeIndex
int getFieldTypeIndex()Get the field type index.- Returns:
- the type index
-
getFieldTypeSignature
Get the field type signature.- Parameters:
effective- true to use the effective signature, false to use the original signature- Returns:
- the field type signature
-
getNameIndex
int getNameIndex()Get the field name index.- Returns:
- the name index
-
getName
Get the name for this field. -
getSignature
Get the signature for this field.Example: Lcom/xyz/Blob;->name:Ljava/lang/String;
- Specified by:
getSignaturein interfaceICodeItem- Parameters:
effective- true to get the actual signature, false to return the original signature (if the unit allows the modification of items)- Returns:
- the signature
-
getSignature
Description copied from interface:ICodeItemGet the item signature.- Specified by:
getSignaturein interfaceICodeItem- Parameters:
effective- true to get the actual signature, false to return the original signature (if the unit allows the modification of items)internal- true to generate internal names (default); false to generate user-friendly signatures (may be the same as the internal signatures)- Returns:
- the signature
-
getSignature
Get the signature for this field.- Parameters:
effective- true to use effective names, false to use original namesinternal- true to use internal Dex notation, false to use user-friendly notationincludeFieldType- true to include the field type- Returns:
- the field signature
-
getSignature
String getSignature(boolean effective, boolean internal, boolean includeFieldType, boolean qualifiedNames) Get the signature for this field.- Parameters:
effective- true to use effective names, false to use original namesinternal- true to use internal Dex notation, false to use user-friendly notationincludeFieldType- true to include the field typequalifiedNames- true to use qualified names, false to use simple names- Returns:
- the field signature
-
setName
Rename this field. This method does not notify changes on success: it is up to the user to issue aJ.UnitChangenotification.This method is for convenience only: users can always use the associated unit's
RENAMEaction (through theexecuteActionmethod) to rename an item generically. -
setName
Rename this field.- Parameters:
name- the new namenotify- true to notify listeners of the change- Returns:
- success indicator
-
getStaticInitializer
IDexValue getStaticInitializer()Retrieve the initial value of this field if it is a static final class field.- Returns:
- the initial field value, null if none or on error
-