Class InjectAnnotationMirror
java.lang.Object
org.immutables.value.processor.meta.InjectAnnotationMirror
- All Implemented Interfaces:
Annotation
InjectAnnotationMirror used to parse data of AnnotationMirror for original annotation
org.immutables.annotate.InjectAnnotation
during annotation processing. Interface is being described using AnnotationInjections.InjectAnnotation annotation,
which should be structurally compatible to the annotation being modelled.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static classprivate static classNested classes/interfaces inherited from class org.immutables.value.processor.meta.AnnotationInjections.InjectAnnotation
AnnotationInjections.InjectAnnotation.Where -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnnotationMirrorprivate final Stringprivate final Stringprivate final booleanstatic final Stringstatic final Stringprivate final AnnotationInjections.InjectAnnotation.Where[]private final TypeMirrorprivate final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInjectAnnotationMirror(AnnotationMirror annotationMirror) privateInjectAnnotationMirror(TypeElement defaultAnnotationElement) -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends Annotation> code()booleanstatic com.google.common.base.Optional<InjectAnnotationMirror> find(Iterable<? extends AnnotationMirror> mirrors) Finds first annotation of this type in an iterable of annotation mirrors.static com.google.common.base.Optional<InjectAnnotationMirror> Finds first annotation of this type on the element.static com.google.common.base.Optional<InjectAnnotationMirror> from(AnnotationMirror mirror) Tries to convert annotation mirror to this annotation type.static InjectAnnotationMirrorfrom(TypeElement element) Creates mirror with default values using annotation element (i.e.static com.google.common.collect.ImmutableList<InjectAnnotationMirror> fromAll(Iterable<? extends AnnotationMirror> mirrors) Converts iterable of annotation mirrors where all annotation are of this type.inthashCode()booleanstatic booleanstatic Stringstatic Stringstatic Stringtarget()toString()Class<? extends Annotation> type()Deprecated.Always throws UnsupportedOperationException.typeName()
-
Field Details
-
QUALIFIED_NAME
- See Also:
-
MIRROR_QUALIFIED_NAME
- See Also:
-
annotationMirror
-
code
-
type
-
typeName
-
ifPresent
private final boolean ifPresent -
target
-
deduplicationKey
-
-
Constructor Details
-
InjectAnnotationMirror
-
InjectAnnotationMirror
-
-
Method Details
-
mirrorQualifiedName
-
qualifiedName
-
simpleName
-
isPresent
-
find
Finds first annotation of this type on the element.- Parameters:
element- annotated element- Returns:
- optional
InjectAnnotationMirror, present if this annotation found
-
find
public static com.google.common.base.Optional<InjectAnnotationMirror> find(Iterable<? extends AnnotationMirror> mirrors) Finds first annotation of this type in an iterable of annotation mirrors.- Parameters:
mirrors- annotation mirrors- Returns:
- optional
InjectAnnotationMirror, present if this annotation found
-
fromAll
public static com.google.common.collect.ImmutableList<InjectAnnotationMirror> fromAll(Iterable<? extends AnnotationMirror> mirrors) Converts iterable of annotation mirrors where all annotation are of this type. Otherwise it fails- Parameters:
mirrors- of this annotation type.- Returns:
- list of converted
InjectAnnotationMirrors
-
from
Creates mirror with default values using annotation element (i.e. declaration, not usage).- Parameters:
element- annotation type element- Returns:
InjectAnnotationMirror
-
from
Tries to convert annotation mirror to this annotation type.- Parameters:
mirror- annotation mirror- Returns:
- optional
InjectAnnotationMirror, present if mirror matched this annotation type
-
code
- Returns:
- value of attribute
code
-
typeName
- Returns:
- type name for value of attribute
type
-
typeMirror
- Returns:
- type mirror for value of attribute
type
-
type
Deprecated.Always throws UnsupportedOperationException. UsetypeMirror()ortypeName. -
ifPresent
public boolean ifPresent()- Returns:
- value of attribute
ifPresent
-
target
- Returns:
- value of attribute
target
-
deduplicationKey
- Returns:
- value of attribute
deduplicationKey
-
getAnnotationMirror
- Returns:
- underlying annotation mirror
-
annotationType
- Specified by:
annotationTypein interfaceAnnotation- Returns:
InjectAnnotation.class
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceAnnotation- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceAnnotation- Overrides:
equalsin classObject
-
toString
- Specified by:
toStringin interfaceAnnotation- Overrides:
toStringin classObject
-