Top Description Fields Constructors Methods
com.google.auto.common

public final Class SimpleTypeAnnotationValue

extends Object
implements AnnotationValue
Class Inheritance
All Implemented Interfaces
javax.lang.model.element.AnnotationValue
Static Imports
com.google.common.base.Preconditions.checkArgument, javax.lang.model.type.TypeKind.ARRAY, .TypeKind.DECLARED

A simple implementation of the AnnotationValue interface for a class literal, e.g. an annotation member of type Class<?> or Class<? extends Foo>.

Field Summary

Modifier and TypeField and Description
private final TypeMirror

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public <R, P> R
accept(AnnotationValueVisitor<R, P>
the visitor operating on this value
visitor
,
P
additional parameter to the visitor
parameter
)

Implements javax.lang.model.element.AnnotationValue.accept.

Applies a visitor to this value.
public TypeMirror
public static AnnotationValue
of(TypeMirror
a primitive, array, or non-parameterized declared type
value
)

An object representing an annotation value instance.

public String
toString()

Overrides java.lang.Object.toString.

Implements javax.lang.model.element.AnnotationValue.toString.

Returns a string representation of this value.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

valueback to summary
private final TypeMirror value

Constructor Detail

SimpleTypeAnnotationValueback to summary
private SimpleTypeAnnotationValue(TypeMirror value)

Method Detail

acceptback to summary
public <R, P> R accept(AnnotationValueVisitor<R, P> visitor, P parameter)

Implements javax.lang.model.element.AnnotationValue.accept.

Doc from javax.lang.model.element.AnnotationValue.accept.

Applies a visitor to this value.

Parameters
<R>
the return type of the visitor's methods
<P>
the type of the additional parameter to the visitor's methods
visitor:AnnotationValueVisitor<R, P>

the visitor operating on this value

parameter:P

additional parameter to the visitor

Returns:R

a visitor-specified result

Annotations
@Override
getValueback to summary
public TypeMirror getValue()

Implements javax.lang.model.element.AnnotationValue.getValue.

Doc from javax.lang.model.element.AnnotationValue.getValue.

Returns the value.

Returns:TypeMirror

the value

Annotations
@Override
ofback to summary
public static AnnotationValue of(TypeMirror value)

An object representing an annotation value instance.

Parameters
value:TypeMirror

a primitive, array, or non-parameterized declared type

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements javax.lang.model.element.AnnotationValue.toString.

Doc from javax.lang.model.element.AnnotationValue.toString.

Returns a string representation of this value. This is returned in a form suitable for representing this value in the source code of an annotation.

Returns:String

a string representation of this value

Annotations
@Override