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 com.google.gwt.thirdparty.guava.common.collect.ImmutableCollection<JPrimitiveType> |
types |
static JPrimitiveType |
VOID |
BY_NAME_COMPARATOR
Modifier and Type | Method and Description |
---|---|
boolean |
canBeImplementedExternally() |
boolean |
canBeNull()
Returns
true if it's possible for this type to be
null . |
boolean |
canBeReferencedExternally() |
boolean |
canBeSubclass()
Returns
true if it's possible for this type to be
a subclass of the type denoted with this type. |
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 |
isArrayType() |
JEnumType |
isEnumOrSubclass()
Returns the (closest) enum supertype if the type is a subclass of an enum; it returns
this if this is a JEnumType and null otherwise. |
boolean |
isFinal() |
boolean |
isJavaLangObject() |
boolean |
isJsFunction() |
boolean |
isJsFunctionImplementation() |
boolean |
isJsNative() |
boolean |
isJsoType()
Returns
true if this is a JavaScriptObject type. |
boolean |
isJsType() |
boolean |
isPrimitiveType() |
JPrimitiveType |
strengthenToNonNull()
Returns a non nullable version of this type if possible.
|
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getCompoundName, getDescription, getName, getPackageName, getShortName, getUnderlyingType, isExternal, isNullType, replaces
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 static final com.google.gwt.thirdparty.guava.common.collect.ImmutableCollection<JPrimitiveType> types
public boolean canBeNull()
JType
true
if it's possible for this type to be
null
.public boolean isArrayType()
isArrayType
in class JType
public boolean isPrimitiveType()
isPrimitiveType
in class JType
public boolean isJsFunction()
isJsFunction
in class JType
public boolean isJsFunctionImplementation()
isJsFunctionImplementation
in class JType
public boolean isJsNative()
isJsNative
in class JType
public boolean canBeImplementedExternally()
canBeImplementedExternally
in class JType
public boolean canBeSubclass()
JType
true
if it's possible for this type to be
a subclass of the type denoted with this type.canBeSubclass
in class JType
JAnalysisDecoratedType
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 JEnumType isEnumOrSubclass()
JType
this
if this
is a JEnumType
and null
otherwise.isEnumOrSubclass
in class JType
public JPrimitiveType strengthenToNonNull()
JType
strengthenToNonNull
in class JType
JAnalysisDecoratedType
public String getWrapperTypeName()
public boolean isFinal()
public boolean isJsoType()
JType
true
if this is a JavaScriptObject type.public boolean canBeReferencedExternally()
canBeReferencedExternally
in class JType
public boolean isJavaLangObject()
isJavaLangObject
in class JType
public void traverse(JVisitor visitor, Context ctx)
JNode
public static JPrimitiveType getType(String typeName)
typeName
or null
if
typeName is not the name of a primitive type.Copyright © 2018. All rights reserved.