Package org.jf.dexlib2.immutable
Class ImmutableAnnotation
java.lang.Object
org.jf.dexlib2.base.BaseAnnotation
org.jf.dexlib2.immutable.ImmutableAnnotation
- All Implemented Interfaces:
Comparable<Annotation>,Annotation,BasicAnnotation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ImmutableConverter<ImmutableAnnotation, Annotation> protected final com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> protected final Stringprotected final intFields inherited from class org.jf.dexlib2.base.BaseAnnotation
BY_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionImmutableAnnotation(int visibility, String type, com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> elements) ImmutableAnnotation(int visibility, String type, Collection<? extends AnnotationElement> elements) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> Gets a set of the name/value elements associated with this annotation.getType()Gets the type of this annotation.intGets the visibility of this annotation.static com.google.common.collect.ImmutableSet<ImmutableAnnotation> immutableSetOf(Iterable<? extends Annotation> list) static ImmutableAnnotationof(Annotation annotation) Methods inherited from class org.jf.dexlib2.base.BaseAnnotation
compareTo, equals, hashCode
-
Field Details
-
visibility
protected final int visibility -
type
-
elements
@Nonnull protected final com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> elements -
CONVERTER
-
-
Constructor Details
-
ImmutableAnnotation
public ImmutableAnnotation(int visibility, @Nonnull String type, @Nullable Collection<? extends AnnotationElement> elements) -
ImmutableAnnotation
public ImmutableAnnotation(int visibility, @Nonnull String type, @Nullable com.google.common.collect.ImmutableSet<? extends ImmutableAnnotationElement> elements)
-
-
Method Details
-
of
-
getVisibility
public int getVisibility()Description copied from interface:AnnotationGets the visibility of this annotation. This will be one of the AnnotationVisibility.* constants.- Returns:
- The visibility of this annotation
-
getType
Description copied from interface:AnnotationGets 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:AnnotationGets 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 Iterable<? extends Annotation> list)
-