Class AnnotationUtils

java.lang.Object
com.android.dx.dex.file.AnnotationUtils

public final class AnnotationUtils extends Object
Utility class for dealing with annotations.
  • Method Details

    • makeAnnotationDefault

      public static Annotation makeAnnotationDefault(Annotation defaults)
      Constructs a standard AnnotationDefault annotation.
      Parameters:
      defaults - non-null; the defaults, itself as an annotation
      Returns:
      non-null; the constructed annotation
    • makeEnclosingClass

      public static Annotation makeEnclosingClass(CstType clazz)
      Constructs a standard EnclosingClass annotation.
      Parameters:
      clazz - non-null; the enclosing class
      Returns:
      non-null; the annotation
    • makeEnclosingMethod

      public static Annotation makeEnclosingMethod(CstMethodRef method)
      Constructs a standard EnclosingMethod annotation.
      Parameters:
      method - non-null; the enclosing method
      Returns:
      non-null; the annotation
    • makeInnerClass

      public static Annotation makeInnerClass(CstString name, int accessFlags)
      Constructs a standard InnerClass annotation.
      Parameters:
      name - null-ok; the original name of the class, or null to represent an anonymous class
      accessFlags - the original access flags
      Returns:
      non-null; the annotation
    • makeMemberClasses

      public static Annotation makeMemberClasses(TypeList types)
      Constructs a standard MemberClasses annotation.
      Parameters:
      types - non-null; the list of (the types of) the member classes
      Returns:
      non-null; the annotation
    • makeSignature

      public static Annotation makeSignature(CstString signature)
      Constructs a standard Signature annotation.
      Parameters:
      signature - non-null; the signature string
      Returns:
      non-null; the annotation
    • makeSourceDebugExtension

      public static Annotation makeSourceDebugExtension(CstString smapString)
      Constructs a standard SourceDebugExtension annotation.
      Parameters:
      smapString - non-null; the SMAP string associated with
      Returns:
      non-null; the annotation
    • makeThrows

      public static Annotation makeThrows(TypeList types)
      Constructs a standard Throws annotation.
      Parameters:
      types - non-null; the list of thrown types
      Returns:
      non-null; the annotation