Interface IDexMethodData
public interface IDexMethodData
This interface represents a Dex
encoded_method object. Only internal methods have
such objects. Retrieved via IDexMethod.getData().-
Method Summary
Modifier and TypeMethodDescriptionintGet the method access flags.Get the code representation for this method.intRetrieve the index of the dex entry that defines this method body.default intDeprecated.int[]Get type indexes of exceptions declared to be thrown by the method.intRetrieve the inline mode for this method.intGet the method index (index of Method object).intCustom flags.booleanConvenience method to check the apt-namedaccess flag.booleanConvenience method to check the apt-namedaccess flag.booleanisFinal()Convenience method to check the apt-namedaccess flag.booleanisNative()Convenience method to check the apt-namedaccess flag.booleanConvenience method to check the apt-namedaccess flag.booleanConvenience method to check the apt-namedaccess flag.booleanisPublic()Convenience method to check the apt-namedaccess flag.booleanisStatic()Convenience method to check the apt-namedaccess flag.booleanConvenience method to check the apt-namedaccess flag.voidsetInlineMode(int mode) Set the inline mode for this method.voidsetUserFlags(int flags) Custom flags.
-
Method Details
-
getMethodIndex
int getMethodIndex()Get the method index (index of Method object).- Returns:
- the method index
-
getAccessFlags
int getAccessFlags()Get the method access flags.- Returns:
- the access flags, refer to the
ACC_xxxconstants in theIDexUnit
-
setInlineMode
void setInlineMode(int mode) Set the inline mode for this method. The mode can be set by user code as a hint for other processors, mostly the decompiler, on how to process this method.- Parameters:
mode- one ofIDexUnit.INLINE_xxx
-
getInlineMode
int getInlineMode()Retrieve the inline mode for this method. SeesetInlineMode(int)for details.- Returns:
- one of
IDexUnit.INLINE_xxx(default isAutomatic)
-
isConstructor
boolean isConstructor()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is a constructor
-
isStatic
boolean isStatic()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is static
-
isAbstract
boolean isAbstract()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is abstract
-
isNative
boolean isNative()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is native
-
isSynthetic
boolean isSynthetic()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is synthetic
-
isPublic
boolean isPublic()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is public
-
isProtected
boolean isProtected()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is protected
-
isPrivate
boolean isPrivate()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is private
-
isFinal
boolean isFinal()Convenience method to check the apt-namedaccess flag.- Returns:
- true if the method is final
-
getCodeItem
IDexCodeItem getCodeItem()Get the code representation for this method.- Returns:
- the code representation, or null if none (eg, abstract methods)
-
getExceptionTypeIndices
int[] getExceptionTypeIndices()Get type indexes of exceptions declared to be thrown by the method.- Returns:
- the type indexes of declared exceptions
-
getDexEntryIndex
int getDexEntryIndex()Retrieve the index of the dex entry that defines this method body.- Returns:
- an index into
IDexUnit.getDexEntries()(of the owner , or -1 if unknown or not defined
-
getDexFileIndex
default int getDexFileIndex()Deprecated.- Returns:
- an index into
IDexUnit.getDexEntries(), or -1 if unknown or not defined
-
getUserFlags
int getUserFlags()Custom flags.- Returns:
- the custom user flags
-
setUserFlags
void setUserFlags(int flags) Custom flags.- Parameters:
flags- the custom user flags
-
getDexEntryIndex()