Package org.jf.dexlib2.iface
Interface Method
-
- All Superinterfaces:
Annotatable,java.lang.Comparable<MethodReference>,Member,MethodReference,Reference
- All Known Implementing Classes:
BuilderMethod,DexBackedMethod,ImmutableMethod,MethodRewriter.RewrittenMethod,ReflectionConstructor,ReflectionMethod
public interface Method extends MethodReference, Member
This class represents a specific method definition in a class. It also acts as a MethodReference to itself. Any equality/comparison is based on its identity as a MethodReference, and shouldn't take into account any non-MethodReference specifics of this method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAccessFlags()Gets the access flags for this method.java.util.Set<? extends Annotation>getAnnotations()Gets a set of the annotations that are applied to this method.java.lang.StringgetDefiningClass()Gets the type of the class that defines this method.java.util.Set<HiddenApiRestriction>getHiddenApiRestrictions()Gets the hidden api restrictions for this method.MethodImplementationgetImplementation()Gets a MethodImplementation object that defines the implementation of the method.java.lang.StringgetName()Gets the name of this method.java.util.List<? extends MethodParameter>getParameters()Gets a list of the parameters of this method.java.lang.StringgetReturnType()Gets the return type of this method.-
Methods inherited from interface org.jf.dexlib2.iface.reference.MethodReference
compareTo, equals, getParameterTypes, hashCode
-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
getDefiningClass
@Nonnull java.lang.String getDefiningClass()
Gets the type of the class that defines this method.- Specified by:
getDefiningClassin interfaceMember- Specified by:
getDefiningClassin interfaceMethodReference- Returns:
- The type of the class that defines this method
-
getName
@Nonnull java.lang.String getName()
Gets the name of this method.- Specified by:
getNamein interfaceMember- Specified by:
getNamein interfaceMethodReference- Returns:
- The name of this method
-
getParameters
@Nonnull java.util.List<? extends MethodParameter> getParameters()
Gets a list of the parameters of this method. As per the MethodReference interface, the MethodParameter objects contained in the returned list also act as a simple reference to the type of the parameter. However, the MethodParameter object can also contain additional information about the parameter. Note: In some implementations, the returned list is likely to *not* provide efficient random access.- Returns:
- A list of MethodParameter objects, representing the parameters of this method.
-
getReturnType
@Nonnull java.lang.String getReturnType()
Gets the return type of this method.- Specified by:
getReturnTypein interfaceMethodReference- Returns:
- The return type of this method.
-
getAccessFlags
int getAccessFlags()
Gets the access flags for this method. This will be a combination of the AccessFlags.* flags that are marked as compatible for use with a method.- Specified by:
getAccessFlagsin interfaceMember- Returns:
- The access flags for this method
-
getAnnotations
@Nonnull java.util.Set<? extends Annotation> getAnnotations()
Gets a set of the annotations that are applied to this method. The annotations in the returned set are guaranteed to have unique types.- Specified by:
getAnnotationsin interfaceAnnotatable- Returns:
- A set of the annotations that are applied to this method
-
getHiddenApiRestrictions
@Nonnull java.util.Set<HiddenApiRestriction> getHiddenApiRestrictions()
Gets the hidden api restrictions for this method. This will contain at most 1 normal flag (with isDomainSpecificApiFlag() = false), and 1 domain-specific api flag (with isDomainSpecificApiFlag() = true)- Specified by:
getHiddenApiRestrictionsin interfaceMember- Returns:
- A set of the hidden api restrictions for this method.
-
getImplementation
@Nullable MethodImplementation getImplementation()
Gets a MethodImplementation object that defines the implementation of the method. If this is an abstract method in an abstract class, or an interface method in an interface definition, then the method has no implementation, and this will return null.- Returns:
- A MethodImplementation object defining the implementation of this method, or null if the method has no implementation
-
-