Interface MethodParameter

All Superinterfaces:
CharSequence, Comparable<CharSequence>, LocalInfo, Reference, TypeReference
All Known Implementing Classes:
BaseMethodParameter, BuilderMethodParameter, ImmutableMethodParameter, MethodParameterRewriter.RewrittenMethodParameter, SmaliMethodParameter

public interface MethodParameter extends TypeReference, LocalInfo
This class represents a method parameter. It also acts as a TypeReference to the type of this parameter. Any equality/comparison is based on its identity as a TypeReference, and should not take into account any details other than the parameter type. It also acts as a LocalInfo object, and conceptually defines the debug information for any parameter register at the beginning of the method.
  • Method Details

    • getType

      @Nonnull String getType()
      The type of this method parameter. This may be any type, including primitive or array types, other than the void (V) type.
      Specified by:
      getType in interface LocalInfo
      Specified by:
      getType in interface TypeReference
      Returns:
      The type of this method parameter
    • getAnnotations

      @Nonnull Set<? extends Annotation> getAnnotations()
      Gets a set of the annotations that are applied to this parameter. The annotations in the returned set are guaranteed to have unique types.
      Returns:
      A set of the annotations that are applied to this parameter
    • getName

      @Nullable String getName()
      Gets the name of this parameter, if available.
      Specified by:
      getName in interface LocalInfo
      Returns:
      The name of this parameter, or null if the name is not available.
    • getSignature

      @Nullable String getSignature()
      Gets the signature of this parameter, if available. The signature of a parameter is defined to be the concatenated version of the dalvik.annotation.Signature annotation applied to this parameter, or null if there is no dalvik.annotation.Signature annotation.
      Specified by:
      getSignature in interface LocalInfo
      Returns:
      The signature of this parameter, or null if not available