Class TypeAdaptersMirror
java.lang.Object
org.immutables.value.processor.meta.TypeAdaptersMirror
- All Implemented Interfaces:
Annotation
TypeAdaptersMirror used to parse data of AnnotationMirror for original annotation
org.immutables.gson.Gson.TypeAdapters
during annotation processing. Interface is being described using GsonMirrors.TypeAdapters 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 class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnnotationMirrorprivate final booleanprivate final booleanprivate final booleanstatic final Stringprivate final booleanstatic final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTypeAdaptersMirror(AnnotationMirror annotationMirror) privateTypeAdaptersMirror(TypeElement defaultAnnotationElement) -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends Annotation> booleanbooleanbooleanstatic com.google.common.base.Optional<TypeAdaptersMirror> find(Iterable<? extends AnnotationMirror> mirrors) Finds first annotation of this type in an iterable of annotation mirrors.static com.google.common.base.Optional<TypeAdaptersMirror> Finds first annotation of this type on the element.static com.google.common.base.Optional<TypeAdaptersMirror> from(AnnotationMirror mirror) Tries to convert annotation mirror to this annotation type.static TypeAdaptersMirrorfrom(TypeElement element) Creates mirror with default values using annotation element (i.e.static com.google.common.collect.ImmutableList<TypeAdaptersMirror> fromAll(Iterable<? extends AnnotationMirror> mirrors) Converts iterable of annotation mirrors where all annotation are of this type.inthashCode()static booleanbooleanstatic Stringbooleanstatic Stringstatic StringtoString()
-
Field Details
-
QUALIFIED_NAME
- See Also:
-
MIRROR_QUALIFIED_NAME
- See Also:
-
annotationMirror
-
metainfService
private final boolean metainfService -
fieldNamingStrategy
private final boolean fieldNamingStrategy -
emptyAsNulls
private final boolean emptyAsNulls -
nullAsDefault
private final boolean nullAsDefault
-
-
Constructor Details
-
TypeAdaptersMirror
-
TypeAdaptersMirror
-
-
Method Details
-
mirrorQualifiedName
-
qualifiedName
-
simpleName
-
isPresent
-
find
Finds first annotation of this type on the element.- Parameters:
element- annotated element- Returns:
- optional
TypeAdaptersMirror, present if this annotation found
-
find
public static com.google.common.base.Optional<TypeAdaptersMirror> find(Iterable<? extends AnnotationMirror> mirrors) Finds first annotation of this type in an iterable of annotation mirrors.- Parameters:
mirrors- annotation mirrors- Returns:
- optional
TypeAdaptersMirror, present if this annotation found
-
fromAll
public static com.google.common.collect.ImmutableList<TypeAdaptersMirror> 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
TypeAdaptersMirrors
-
from
Creates mirror with default values using annotation element (i.e. declaration, not usage).- Parameters:
element- annotation type element- Returns:
TypeAdaptersMirror
-
from
Tries to convert annotation mirror to this annotation type.- Parameters:
mirror- annotation mirror- Returns:
- optional
TypeAdaptersMirror, present if mirror matched this annotation type
-
metainfService
public boolean metainfService()- Returns:
- value of attribute
metainfService
-
fieldNamingStrategy
public boolean fieldNamingStrategy()- Returns:
- value of attribute
fieldNamingStrategy
-
emptyAsNulls
public boolean emptyAsNulls()- Returns:
- value of attribute
emptyAsNulls
-
nullAsDefault
public boolean nullAsDefault()- Returns:
- value of attribute
nullAsDefault
-
getAnnotationMirror
- Returns:
- underlying annotation mirror
-
annotationType
- Specified by:
annotationTypein interfaceAnnotation- Returns:
TypeAdapters.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
-