Package com.android.dx.dex.file
Class AnnotationUtils
java.lang.Object
com.android.dx.dex.file.AnnotationUtils
Utility class for dealing with annotations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Annotation
makeAnnotationDefault
(Annotation defaults) Constructs a standardAnnotationDefault
annotation.static Annotation
makeEnclosingClass
(CstType clazz) Constructs a standardEnclosingClass
annotation.static Annotation
makeEnclosingMethod
(CstMethodRef method) Constructs a standardEnclosingMethod
annotation.static Annotation
makeInnerClass
(CstString name, int accessFlags) Constructs a standardInnerClass
annotation.static Annotation
makeMemberClasses
(TypeList types) Constructs a standardMemberClasses
annotation.static Annotation
makeSignature
(CstString signature) Constructs a standardSignature
annotation.static Annotation
makeSourceDebugExtension
(CstString smapString) Constructs a standardSourceDebugExtension
annotation.static Annotation
makeThrows
(TypeList types) Constructs a standardThrows
annotation.
-
Method Details
-
makeAnnotationDefault
Constructs a standardAnnotationDefault
annotation.- Parameters:
defaults
-non-null;
the defaults, itself as an annotation- Returns:
non-null;
the constructed annotation
-
makeEnclosingClass
Constructs a standardEnclosingClass
annotation.- Parameters:
clazz
-non-null;
the enclosing class- Returns:
non-null;
the annotation
-
makeEnclosingMethod
Constructs a standardEnclosingMethod
annotation.- Parameters:
method
-non-null;
the enclosing method- Returns:
non-null;
the annotation
-
makeInnerClass
Constructs a standardInnerClass
annotation.- Parameters:
name
-null-ok;
the original name of the class, ornull
to represent an anonymous classaccessFlags
- the original access flags- Returns:
non-null;
the annotation
-
makeMemberClasses
Constructs a standardMemberClasses
annotation.- Parameters:
types
-non-null;
the list of (the types of) the member classes- Returns:
non-null;
the annotation
-
makeSignature
Constructs a standardSignature
annotation.- Parameters:
signature
-non-null;
the signature string- Returns:
non-null;
the annotation
-
makeSourceDebugExtension
Constructs a standardSourceDebugExtension
annotation.- Parameters:
smapString
-non-null;
the SMAP string associated with- Returns:
non-null;
the annotation
-
makeThrows
Constructs a standardThrows
annotation.- Parameters:
types
-non-null;
the list of thrown types- Returns:
non-null;
the annotation
-