mirror of
https://github.com/revanced/smali.git
synced 2025-05-22 19:08:52 +02:00
Add a common superclass for Annotation and AnnotationEncodedValue
This commit is contained in:
parent
13705697c2
commit
9ed12bac38
@ -38,7 +38,7 @@ import java.util.Set;
|
||||
/**
|
||||
* This class represents a specific instance of an annotation applied to a class/field/method/parameter
|
||||
*/
|
||||
public interface Annotation extends Comparable<Annotation> {
|
||||
public interface Annotation extends BasicAnnotation, Comparable<Annotation> {
|
||||
/**
|
||||
* Gets the visibility of this annotation.
|
||||
*
|
||||
|
@ -0,0 +1,27 @@
|
||||
package org.jf.dexlib2.iface;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* This represents a basic annotation, and serves as a common superclass for Annotation and AnnotationEncodedValue
|
||||
*/
|
||||
public interface BasicAnnotation {
|
||||
/**
|
||||
* Gets the type of this annotation.
|
||||
*
|
||||
* This will be the type descriptor of the class that defines this annotation.
|
||||
*
|
||||
* @return The type of this annotation
|
||||
*/
|
||||
@Nonnull String getType();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @return A set of AnnotationElements
|
||||
*/
|
||||
@Nonnull Set<? extends AnnotationElement> getElements();
|
||||
}
|
@ -32,6 +32,7 @@
|
||||
package org.jf.dexlib2.iface.value;
|
||||
|
||||
import org.jf.dexlib2.iface.AnnotationElement;
|
||||
import org.jf.dexlib2.iface.BasicAnnotation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
@ -40,7 +41,7 @@ import java.util.Set;
|
||||
/**
|
||||
* This class represents an encoded annotation value.
|
||||
*/
|
||||
public interface AnnotationEncodedValue extends EncodedValue {
|
||||
public interface AnnotationEncodedValue extends EncodedValue, BasicAnnotation {
|
||||
/**
|
||||
* Gets the type of this annotation.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user