Package org.jf.dexlib2.immutable
Class ImmutableAnnotation
- java.lang.Object
-
- org.jf.dexlib2.base.BaseAnnotation
-
- org.jf.dexlib2.immutable.ImmutableAnnotation
-
- All Implemented Interfaces:
java.lang.Comparable<Annotation>
,Annotation
,BasicAnnotation
public class ImmutableAnnotation extends BaseAnnotation
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement>
elements
protected java.lang.String
type
protected int
visibility
-
Fields inherited from class org.jf.dexlib2.base.BaseAnnotation
BY_TYPE
-
-
Constructor Summary
Constructors Constructor Description ImmutableAnnotation(int visibility, java.lang.String type, com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> elements)
ImmutableAnnotation(int visibility, java.lang.String type, java.util.Collection<? extends AnnotationElement> elements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement>
getElements()
Gets a set of the name/value elements associated with this annotation.java.lang.String
getType()
Gets the type of this annotation.int
getVisibility()
Gets the visibility of this annotation.static com.google.common.collect.ImmutableSet<ImmutableAnnotation>
immutableSetOf(java.lang.Iterable<? extends Annotation> list)
static ImmutableAnnotation
of(Annotation annotation)
-
Methods inherited from class org.jf.dexlib2.base.BaseAnnotation
compareTo, equals, hashCode
-
-
-
-
Field Detail
-
visibility
protected final int visibility
-
type
@Nonnull protected final java.lang.String type
-
elements
@Nonnull protected final com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> elements
-
-
Constructor Detail
-
ImmutableAnnotation
public ImmutableAnnotation(int visibility, @Nonnull java.lang.String type, @Nullable java.util.Collection<? extends AnnotationElement> elements)
-
ImmutableAnnotation
public ImmutableAnnotation(int visibility, @Nonnull java.lang.String type, @Nullable com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> elements)
-
-
Method Detail
-
of
public static ImmutableAnnotation of(Annotation annotation)
-
getVisibility
public int getVisibility()
Description copied from interface:Annotation
Gets the visibility of this annotation. This will be one of the AnnotationVisibility.* constants.- Returns:
- The visibility of this annotation
-
getType
@Nonnull public java.lang.String getType()
Description copied from interface:Annotation
Gets the type of this annotation. This will be the type descriptor of the class that defines this annotation.- Returns:
- The type of this annotation
-
getElements
@Nonnull public com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> getElements()
Description copied from interface:Annotation
Gets a set of the name/value elements associated with this annotation. The elements in the returned set will be unique with respect to the element name.- Returns:
- A set of AnnotationElements
-
immutableSetOf
@Nonnull public static com.google.common.collect.ImmutableSet<ImmutableAnnotation> immutableSetOf(@Nullable java.lang.Iterable<? extends Annotation> list)
-
-