public class JPrimitiveType extends JType
HasName.Util
Modifier and Type | Field and Description |
---|---|
static JPrimitiveType |
BOOLEAN |
static JPrimitiveType |
BYTE |
static JPrimitiveType |
CHAR |
static JPrimitiveType |
DOUBLE |
static JPrimitiveType |
FLOAT |
static JPrimitiveType |
INT |
static JPrimitiveType |
LONG |
static JPrimitiveType |
SHORT |
static JPrimitiveType |
VOID |
BY_NAME_COMPARATOR
Modifier and Type | Method and Description |
---|---|
boolean |
canBeNull()
Returns
true if it's possible for this type to be
null . |
JValueLiteral |
coerce(JValueLiteral literal) |
JLiteral |
getDefaultValue() |
String |
getJavahSignatureName() |
String |
getJsniSignatureName() |
static JPrimitiveType |
getType(String typeName)
Returns the JPrimitiveType instance corresponding to
typeName or null if
typeName is not the name of a primitive type. |
String |
getWrapperTypeName() |
boolean |
isFinal() |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getCompoundName, getName, getPackageName, getShortName, getUnderlyingType, isEnumOrSubclass, isExternal
getSourceInfo, setSourceInfo, toSource, toString
public static final JPrimitiveType BOOLEAN
public static final JPrimitiveType BYTE
public static final JPrimitiveType CHAR
public static final JPrimitiveType DOUBLE
public static final JPrimitiveType FLOAT
public static final JPrimitiveType INT
public static final JPrimitiveType LONG
public static final JPrimitiveType SHORT
public static final JPrimitiveType VOID
public boolean canBeNull()
true
if it's possible for this type to be
null
.canBeNull
in class JType
JNonNullType
public JValueLiteral coerce(JValueLiteral literal)
public final JLiteral getDefaultValue()
getDefaultValue
in class JType
public String getJavahSignatureName()
getJavahSignatureName
in class JType
public String getJsniSignatureName()
getJsniSignatureName
in class JType
public String getWrapperTypeName()
public boolean isFinal()
public void traverse(JVisitor visitor, Context ctx)
JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalpublic static JPrimitiveType getType(String typeName)
typeName
or null
if
typeName is not the name of a primitive type.Copyright © 2016. All rights reserved.