public final class AnnotationSpec
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationSpec.Builder |
private static class |
AnnotationSpec.Visitor
Annotation value visitor adding members to the given builder instance.
|
Modifier and Type | Field and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<CodeBlock>> |
members |
TypeName |
type |
Modifier | Constructor and Description |
---|---|
private |
AnnotationSpec(AnnotationSpec.Builder builder) |
Modifier and Type | Method and Description |
---|---|
static AnnotationSpec.Builder |
builder(java.lang.Class<?> type) |
static AnnotationSpec.Builder |
builder(ClassName type) |
(package private) void |
emit(CodeWriter codeWriter,
boolean inline) |
private void |
emitAnnotationValues(CodeWriter codeWriter,
java.lang.String whitespace,
java.lang.String memberSeparator,
java.util.List<CodeBlock> values) |
boolean |
equals(java.lang.Object o) |
static AnnotationSpec |
get(java.lang.annotation.Annotation annotation) |
static AnnotationSpec |
get(java.lang.annotation.Annotation annotation,
boolean includeDefaultValues) |
static AnnotationSpec |
get(javax.lang.model.element.AnnotationMirror annotation) |
int |
hashCode() |
AnnotationSpec.Builder |
toBuilder() |
java.lang.String |
toString() |
public final TypeName type
public final java.util.Map<java.lang.String,java.util.List<CodeBlock>> members
private AnnotationSpec(AnnotationSpec.Builder builder)
void emit(CodeWriter codeWriter, boolean inline) throws java.io.IOException
java.io.IOException
private void emitAnnotationValues(CodeWriter codeWriter, java.lang.String whitespace, java.lang.String memberSeparator, java.util.List<CodeBlock> values) throws java.io.IOException
java.io.IOException
public static AnnotationSpec get(java.lang.annotation.Annotation annotation)
public static AnnotationSpec get(java.lang.annotation.Annotation annotation, boolean includeDefaultValues)
public static AnnotationSpec get(javax.lang.model.element.AnnotationMirror annotation)
public static AnnotationSpec.Builder builder(ClassName type)
public static AnnotationSpec.Builder builder(java.lang.Class<?> type)
public AnnotationSpec.Builder toBuilder()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object