Interface Annotated<T>
- Type Parameters:
T- the type of the annotated object
public interface Annotated<T>
An interface whose implementations bear semantically significant annotations.
Semantically significant annotations are included in hashcode and equality computations.
- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the non-null, determinate, annotated object.static <T extends AnnotatedConstruct>
Annotated<T> of(T ac) A convenience method that returns a newAnnotatedimplementation.static <T extends AnnotatedConstruct>
Annotated<T> of(T ac, Predicate<? super ExecutableElement> p) A convenience method that returns a newAnnotatedimplementation.
-
Method Details
-
annotations
Returns a non-null, immutable, determinateListof semantically significantAnnotationMirrors.These annotations supersede any annotations that might otherwise be available from objects returned by the
annotated()method.- Returns:
- a non-
null, immutable, determinateListof semantically significantAnnotationMirrors.
-
annotated
-
of
A convenience method that returns a newAnnotatedimplementation.- Type Parameters:
T- the type ofAnnotatedConstruct- Parameters:
ac- a non-nullAnnotatedConstruct- Returns:
- a new, non-
nullAnnotatedimplementation - Throws:
NullPointerException- ifacisnull- See Also:
-
of
A convenience method that returns a newAnnotatedimplementation.- Type Parameters:
T- the type ofAnnotatedConstruct- Parameters:
ac- a non-nullAnnotatedConstructp- aPredicatethat returnstrueif a givenExecutableElement, representing an annotation element, is to be included in comparison operations; may benullin which case it is as ife -> truewere supplied instead- Returns:
- a new, non-
nullAnnotatedimplementation - Throws:
NullPointerException- ifacisnull
-