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 |
Modifier and Type | Method and Description |
---|---|
JValueLiteral |
coerceLiteral(JValueLiteral value)
Returns a literal which has been coerced to this type, or
null
if no such coercion is possible. |
String |
getClassLiteralFactoryMethod() |
JLiteral |
getDefaultValue() |
String |
getJavahSignatureName() |
String |
getJsniSignatureName() |
String |
getWrapperTypeName() |
boolean |
isFinal() |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getName, 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 JValueLiteral coerceLiteral(JValueLiteral value)
null
if no such coercion is possible.public String getClassLiteralFactoryMethod()
getClassLiteralFactoryMethod
in class JType
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 traversalCopyright © 2018. All rights reserved.