public static class Type.JCPrimitiveType extends Type implements PrimitiveType
Type.AnnotatedType, Type.ArrayType, Type.CapturedType, Type.CapturedUndetVar, Type.ClassType, Type.DelegatedType, Type.ErasedClassType, Type.ErrorType, Type.ForAll, Type.IntersectionClassType, Type.JCNoType, Type.JCPrimitiveType, Type.JCVoidType, Type.Mapping, Type.MethodType, Type.PackageType, Type.TypeVar, Type.UndetVar, Type.UnionClassType, Type.UnknownType, Type.Visitor<R,S>, Type.WildcardType
Constructor and Description |
---|
JCPrimitiveType(TypeTag tag,
Symbol.TypeSymbol tsym) |
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(TypeVisitor<R,P> v,
P p)
Applies a visitor to this type.
|
Type |
constType(Object constValue)
Define a constant type, of the same kind as this type
and with given constant value
|
TypeKind |
getKind()
Returns the
kind of this type. |
TypeTag |
getTag()
Returns the current type tag.
|
boolean |
isFalse()
Is this a constant type whose value is false?
|
boolean |
isNumeric() |
boolean |
isPrimitive() |
boolean |
isPrimitiveOrVoid() |
boolean |
isTrue()
Is this a constant type whose value is true?
|
String |
stringValue()
The constant value of this type, converted to String
|
accept, allparams, annotatedType, argtypes, asElement, asMethodType, baseType, baseTypes, complete, constValue, contains, contains, containsAny, containsAny, equals, filter, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosingType, getLowerBound, getModelType, getModelTypes, getOriginalType, getParameterTypes, getReceiverType, getReturnType, getThrownTypes, getTypeArguments, getUpperBound, hashCode, hasTag, isAnnotated, isCompound, isErroneous, isErroneous, isExtendsBound, isFinal, isInterface, isNullOrReference, isParameterized, isPartial, isRaw, isReference, isSuperBound, isUnbound, map, map, toString, toString, unannotatedType, withTypeVar
getAttribute, getInheritedAnnotations
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, hashCode, toString
getAnnotation, getAnnotationMirrors, getAnnotationsByType
public JCPrimitiveType(TypeTag tag, Symbol.TypeSymbol tsym)
public boolean isPrimitive()
isPrimitive
in class Type
public boolean isPrimitiveOrVoid()
isPrimitiveOrVoid
in class Type
public Type constType(Object constValue)
public String stringValue()
stringValue
in class Type
public boolean isFalse()
public boolean isTrue()
public <R,P> R accept(TypeVisitor<R,P> v, P p)
TypeMirror
accept
in interface TypeMirror
accept
in class Type
R
- the return type of the visitor's methodsP
- the type of the additional parameter to the visitor's methodsv
- the visitor operating on this typep
- additional parameter to the visitorpublic TypeKind getKind()
TypeMirror
kind
of this type.getKind
in interface TypeMirror
getKind
in class Type
Copyright © 2015. All rights reserved.