public class Primitive extends java.lang.Object implements GeneratedType
| Constructor and Description |
|---|
Primitive(java.lang.Class<?> type) |
Primitive(java.lang.String packageName,
java.lang.String className,
java.lang.String... templateArgs) |
| Modifier and Type | Method and Description |
|---|---|
static Primitive |
forCanonicalName(java.lang.String canonicalName)
Try to bind the given type to an existing class in the classLoader.
|
com.squareup.javapoet.TypeName |
generableClass()
Generate the
TypeName of the given Primitive. |
java.lang.String |
getClassName() |
java.lang.String |
getPackageName() |
java.util.List<Primitive> |
getTemplateArgs() |
java.lang.String |
simpleName() |
public Primitive(java.lang.Class<?> type)
public Primitive(java.lang.String packageName,
java.lang.String className,
java.lang.String... templateArgs)
public static Primitive forCanonicalName(java.lang.String canonicalName)
canonicalName - The name of the class, may be fully qualified or not.Primitive with the found class, null if nothing found.public com.squareup.javapoet.TypeName generableClass()
TypeName of the given Primitive.
Can either be a ClassName in case of a simple, raw type;
or a ParameterizedTypeName in case of a templated type.
The template parameters are recursively transformed by this method.generableClass in interface GeneratedTypeTypeNamepublic java.lang.String simpleName()
simpleName in interface GeneratedTypepublic java.lang.String getClassName()
public java.lang.String getPackageName()
public java.util.List<Primitive> getTemplateArgs()