public class TypeMirrors
extends java.lang.Object
TypeMirror instances.| Constructor and Description |
|---|
TypeMirrors() |
| Modifier and Type | Method and Description |
|---|---|
static javax.lang.model.type.TypeMirror |
typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
java.lang.Class<?> cls)
Returns a
TypeMirror for the given class (raw T, not T<?>, if T is generic). |
static javax.lang.model.type.TypeMirror |
typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
java.lang.String typeSnippet,
javax.lang.model.type.TypeMirror... args)
Returns a
TypeMirror for the given type, substituting any provided arguments for
%1, %2, etc. |
static javax.lang.model.type.TypeMirror |
typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
java.lang.reflect.Type type)
Returns a
TypeMirror for the given type. |
static javax.lang.model.type.TypeMirror |
typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
com.google.common.reflect.TypeToken<?> type)
Returns a
TypeMirror for the given type. |
public static javax.lang.model.type.TypeMirror typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
java.lang.Class<?> cls)
TypeMirror for the given class (raw T, not T<?>, if T is generic).public static javax.lang.model.type.TypeMirror typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
com.google.common.reflect.TypeToken<?> type)
TypeMirror for the given type.public static javax.lang.model.type.TypeMirror typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
java.lang.reflect.Type type)
TypeMirror for the given type.public static javax.lang.model.type.TypeMirror typeMirror(javax.lang.model.util.Types typeUtils,
javax.lang.model.util.Elements elementUtils,
java.lang.String typeSnippet,
javax.lang.model.type.TypeMirror... args)
TypeMirror for the given type, substituting any provided arguments for
%1, %2, etc.
e.g. typeMirror(types, elements, "java.util.List<%1>",
typeMirror(types, elements, String.class)) will return the same thing as
typeMirror(types, elements, "java.util.List<java.lang.String>")
typeUtils - an implementation of TypeselementUtils - an implementation of ElementstypeSnippet - the type, represented as a snippet of Java code, e.g.
"java.lang.String", "java.util.Map<%1, %2>"args - existing TypeMirror instances to be substituted into the type