com.android.dx.dex.file
Class AnnotationUtils

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

public final class AnnotationUtils
extends Object

Utility class for dealing with annotations.


Method Summary
static Annotation makeAnnotationDefault(Annotation defaults)
          Constructs a standard AnnotationDefault annotation.
static Annotation makeEnclosingClass(CstType clazz)
          Constructs a standard EnclosingClass annotation.
static Annotation makeEnclosingMethod(CstMethodRef method)
          Constructs a standard EnclosingMethod annotation.
static Annotation makeInnerClass(CstString name, int accessFlags)
          Constructs a standard InnerClass annotation.
static Annotation makeMemberClasses(TypeList types)
          Constructs a standard MemberClasses annotation.
static Annotation makeSignature(CstString signature)
          Constructs a standard Signature annotation.
static Annotation makeThrows(TypeList types)
          Constructs a standard Throws annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

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


Copyright © 2013. All Rights Reserved.