public abstract class AnnotationLiteral<T extends java.lang.annotation.Annotation>
extends java.lang.Object
implements java.lang.annotation.Annotation, java.io.Serializable
Annotation current = new AnnotationLiteral<Current>() {}
Annotation named = new AnnotationLiteral<Named>() {
public String name() { return "my-name"; }
}
Modifier | Constructor and Description |
---|---|
protected |
AnnotationLiteral() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType() |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.String |
toString() |
public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
annotationType
in interface java.lang.annotation.Annotation
public boolean equals(java.lang.Object o)
equals
in interface java.lang.annotation.Annotation
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.lang.annotation.Annotation
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in interface java.lang.annotation.Annotation
toString
in class java.lang.Object