Package org.jboss.jdeparser
Class JTypes
- java.lang.Object
-
- org.jboss.jdeparser.JTypes
-
public final class JTypes extends java.lang.Object
The factory for generating simple types.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
JTypes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JType
$t(java.lang.Class<?> clazz)
Return the type corresponding to the given class.static JType
$t(java.lang.String name)
Return a type corresponding to a class with the given name.static JType
$t(JClassDef classDef)
Return the erased type of a class definition.static JType
typeNamed(java.lang.String name)
Return a type corresponding to a class with the given name.static JType
typeOf(java.lang.Class<?> clazz)
Return the type corresponding to the given class.static JType
typeOf(javax.lang.model.type.TypeMirror typeMirror)
Get aJType
that corresponds to the givenTypeMirror
for annotation processors.static JType
typeOf(JClassDef classDef)
Return the erased type of a class definition.
-
-
-
Field Detail
-
cache
static final java.lang.ThreadLocal<java.util.LinkedHashMap<java.lang.String,JType>> cache
-
-
Method Detail
-
$t
public static JType $t(JClassDef classDef)
Return the erased type of a class definition.- Parameters:
classDef
- the class definition- Returns:
- the type
-
$t
public static JType $t(java.lang.Class<?> clazz)
Return the type corresponding to the given class.- Parameters:
clazz
- the class- Returns:
- the type
-
$t
public static JType $t(java.lang.String name)
Return a type corresponding to a class with the given name.- Parameters:
name
- the class name- Returns:
- the type
-
typeOf
public static JType typeOf(JClassDef classDef)
Return the erased type of a class definition.- Parameters:
classDef
- the class definition- Returns:
- the type
-
typeOf
public static JType typeOf(java.lang.Class<?> clazz)
Return the type corresponding to the given class.- Parameters:
clazz
- the class- Returns:
- the type
-
typeNamed
public static JType typeNamed(java.lang.String name)
Return a type corresponding to a class with the given name.- Parameters:
name
- the class name- Returns:
- the type
-
typeOf
public static JType typeOf(javax.lang.model.type.TypeMirror typeMirror)
Get aJType
that corresponds to the givenTypeMirror
for annotation processors.- Parameters:
typeMirror
- the type mirror- Returns:
- the
JType
-
-