Package org.fulib.scenarios.ast.type
Enum PrimitiveType
- java.lang.Object
-
- java.lang.Enum<PrimitiveType>
-
- org.fulib.scenarios.ast.type.PrimitiveType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PrimitiveType>
,Node
,Positioned
,Type
public enum PrimitiveType extends java.lang.Enum<PrimitiveType> implements Type
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.fulib.scenarios.ast.Positioned
Positioned.Impl
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEAN
BOOLEAN_WRAPPER
BYTE
BYTE_WRAPPER
CHAR
CHAR_WRAPPER
DOUBLE
DOUBLE_WRAPPER
ERROR
FLOAT
FLOAT_WRAPPER
INT
INT_WRAPPER
LONG
LONG_WRAPPER
OBJECT
SHORT
SHORT_WRAPPER
STRING
VOID
VOID_WRAPPER
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,PrimitiveType>
javaNameMap
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <P,R>
Raccept(Node.Visitor<P,R> visitor, P par)
<P,R>
Raccept(org.fulib.scenarios.ast.type.PrimitiveType.Visitor<P,R> visitor, P par)
<P,R>
Raccept(Type.Visitor<P,R> visitor, P par)
java.lang.String
getJavaName()
Position
getPosition()
static boolean
isIntegral(PrimitiveType type)
static boolean
isIntegral(Type type)
static boolean
isNumeric(PrimitiveType type)
static boolean
isNumeric(Type type)
static boolean
isPrimitiveOrWrapperValue(PrimitiveType type)
static boolean
isPrimitiveOrWrapperValue(Type type)
static PrimitiveType
primitiveToWrapper(PrimitiveType type)
static Type
primitiveToWrapper(Type type)
void
setPosition(Position position)
static PrimitiveType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PrimitiveType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.fulib.scenarios.ast.type.Type
accept, getDescription
-
-
-
-
Enum Constant Detail
-
ERROR
public static final PrimitiveType ERROR
-
VOID
public static final PrimitiveType VOID
-
BOOLEAN
public static final PrimitiveType BOOLEAN
-
BYTE
public static final PrimitiveType BYTE
-
SHORT
public static final PrimitiveType SHORT
-
CHAR
public static final PrimitiveType CHAR
-
INT
public static final PrimitiveType INT
-
LONG
public static final PrimitiveType LONG
-
FLOAT
public static final PrimitiveType FLOAT
-
DOUBLE
public static final PrimitiveType DOUBLE
-
OBJECT
public static final PrimitiveType OBJECT
-
STRING
public static final PrimitiveType STRING
-
VOID_WRAPPER
public static final PrimitiveType VOID_WRAPPER
-
BOOLEAN_WRAPPER
public static final PrimitiveType BOOLEAN_WRAPPER
-
BYTE_WRAPPER
public static final PrimitiveType BYTE_WRAPPER
-
SHORT_WRAPPER
public static final PrimitiveType SHORT_WRAPPER
-
CHAR_WRAPPER
public static final PrimitiveType CHAR_WRAPPER
-
INT_WRAPPER
public static final PrimitiveType INT_WRAPPER
-
LONG_WRAPPER
public static final PrimitiveType LONG_WRAPPER
-
FLOAT_WRAPPER
public static final PrimitiveType FLOAT_WRAPPER
-
DOUBLE_WRAPPER
public static final PrimitiveType DOUBLE_WRAPPER
-
-
Field Detail
-
javaNameMap
public static final java.util.Map<java.lang.String,PrimitiveType> javaNameMap
-
-
Method Detail
-
values
public static PrimitiveType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PrimitiveType c : PrimitiveType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PrimitiveType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getJavaName
public java.lang.String getJavaName()
-
getPosition
public Position getPosition()
- Specified by:
getPosition
in interfacePositioned
-
setPosition
public void setPosition(Position position)
- Specified by:
setPosition
in interfacePositioned
-
accept
public <P,R> R accept(Node.Visitor<P,R> visitor, P par)
-
accept
public <P,R> R accept(Type.Visitor<P,R> visitor, P par)
-
accept
public <P,R> R accept(org.fulib.scenarios.ast.type.PrimitiveType.Visitor<P,R> visitor, P par)
-
primitiveToWrapper
public static PrimitiveType primitiveToWrapper(PrimitiveType type)
-
isNumeric
public static boolean isNumeric(Type type)
-
isNumeric
public static boolean isNumeric(PrimitiveType type)
-
isIntegral
public static boolean isIntegral(Type type)
-
isIntegral
public static boolean isIntegral(PrimitiveType type)
-
isPrimitiveOrWrapperValue
public static boolean isPrimitiveOrWrapperValue(Type type)
-
isPrimitiveOrWrapperValue
public static boolean isPrimitiveOrWrapperValue(PrimitiveType type)
-
-