Package com.squareup.javapoet
Class AnnotationSpec
- java.lang.Object
-
- com.squareup.javapoet.AnnotationSpec
-
public final class AnnotationSpec extends java.lang.ObjectA generated annotation on a declaration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnnotationSpec.Builderprivate static classAnnotationSpec.VisitorAnnotation value visitor adding members to the given builder instance.
-
Constructor Summary
Constructors Modifier Constructor Description privateAnnotationSpec(AnnotationSpec.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnnotationSpec.Builderbuilder(ClassName type)static AnnotationSpec.Builderbuilder(java.lang.Class<?> type)(package private) voidemit(CodeWriter codeWriter, boolean inline)private voidemitAnnotationValues(CodeWriter codeWriter, java.lang.String whitespace, java.lang.String memberSeparator, java.util.List<CodeBlock> values)booleanequals(java.lang.Object o)static AnnotationSpecget(java.lang.annotation.Annotation annotation)static AnnotationSpecget(java.lang.annotation.Annotation annotation, boolean includeDefaultValues)static AnnotationSpecget(javax.lang.model.element.AnnotationMirror annotation)inthashCode()AnnotationSpec.BuildertoBuilder()java.lang.StringtoString()
-
-
-
Constructor Detail
-
AnnotationSpec
private AnnotationSpec(AnnotationSpec.Builder builder)
-
-
Method Detail
-
emit
void emit(CodeWriter codeWriter, boolean inline) throws java.io.IOException
- Throws:
java.io.IOException
-
emitAnnotationValues
private void emitAnnotationValues(CodeWriter codeWriter, java.lang.String whitespace, java.lang.String memberSeparator, java.util.List<CodeBlock> values) throws java.io.IOException
- Throws:
java.io.IOException
-
get
public static AnnotationSpec get(java.lang.annotation.Annotation annotation)
-
get
public static AnnotationSpec get(java.lang.annotation.Annotation annotation, boolean includeDefaultValues)
-
get
public static AnnotationSpec get(javax.lang.model.element.AnnotationMirror annotation)
-
builder
public static AnnotationSpec.Builder builder(ClassName type)
-
builder
public static AnnotationSpec.Builder builder(java.lang.Class<?> type)
-
toBuilder
public AnnotationSpec.Builder toBuilder()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-