public static class AnnotationUtils.AnnotationBuilder extends @NonNull Object
AnnotationMirror
requires: SetValue
methodsbuild()
to get the annotation build so far
Once an annotation is built, no further modification or calls to
build can be made. Otherwise, a IllegalStateException
.
All setter methods throw IllegalArgumentException
if the
specified element is not found, or that the given value is not a
subtype of the expected type.
TODO: Doesn't type check arrays yetConstructor and Description |
---|
AnnotationUtils.AnnotationBuilder(ProcessingEnvironment env,
@Nullable AnnotationMirror annotation) |
AnnotationUtils.AnnotationBuilder(ProcessingEnvironment env,
CharSequence name) |
AnnotationUtils.AnnotationBuilder(ProcessingEnvironment env,
Class<? extends Annotation> anno) |
public AnnotationUtils.AnnotationBuilder(ProcessingEnvironment env, Class<? extends Annotation> anno)
public AnnotationUtils.AnnotationBuilder(ProcessingEnvironment env, CharSequence name)
public AnnotationUtils.AnnotationBuilder(ProcessingEnvironment env, @Nullable AnnotationMirror annotation)
public @Nullable AnnotationMirror build()
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, @Nullable AnnotationMirror value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, List<? extends @NonNull Object> values)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Object[] values)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, @PolyRead Boolean value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Character value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Double value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Float value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Integer value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Long value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Short value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, @ReadOnly String value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, TypeMirror value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Class<?> value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Enum<?> value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, VariableElement value)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, Enum<?>[] values)
public AnnotationUtils.AnnotationBuilder setValue(CharSequence elementName, VariableElement[] values)
public @NonNull ExecutableElement findElement(CharSequence key)