public final class PrimitiveType extends java.lang.Object implements Type
Modifier and Type | Field and Description |
---|---|
private ProgramElementName |
arrayElementName |
private Literal |
defaultValue |
static PrimitiveType |
JAVA_BIGINT |
static PrimitiveType |
JAVA_BOOLEAN |
static PrimitiveType |
JAVA_BYTE |
static PrimitiveType |
JAVA_CHAR |
static PrimitiveType |
JAVA_DOUBLE |
static PrimitiveType |
JAVA_FLOAT |
static PrimitiveType |
JAVA_FREE_ADT |
static PrimitiveType |
JAVA_INT |
static PrimitiveType |
JAVA_LOCSET |
static PrimitiveType |
JAVA_LONG |
static PrimitiveType |
JAVA_MAP |
static PrimitiveType |
JAVA_REAL |
static PrimitiveType |
JAVA_SEQ |
static PrimitiveType |
JAVA_SHORT |
private static java.util.Map<Name,PrimitiveType> |
ldtMap |
private Name |
ldtName |
private java.lang.String |
name |
static PrimitiveType |
PROGRAM_SV |
private static java.util.Map<java.lang.String,PrimitiveType> |
typeMap |
Modifier | Constructor and Description |
---|---|
private |
PrimitiveType(java.lang.String name,
Literal defaultValue,
Name ldtName) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
ProgramElementName |
getArrayElementName()
Returns the specific name of this primitive type used
in array types.
|
Name |
getCorrespondingLDTName()
Gets the name of the LDT corresponding to this primitive type.
|
Literal |
getDefaultValue()
returns the default value of the given type
according to JLS ???
|
java.lang.String |
getFullName()
Returns the name of type.
|
java.lang.String |
getName()
Returns the name of this type.
|
static PrimitiveType |
getPrimitiveType(java.lang.String name) |
static PrimitiveType |
getPrimitiveTypeByLDT(Name ldtName) |
int |
hashCode() |
boolean |
isArithmeticType()
Returns true if this is an integer or floating point type.
|
boolean |
isIntegerType()
Returns whether this is a Java type which translates to int in DL.
|
java.lang.String |
toString()
Returns the name of type.
|
private static final java.util.Map<java.lang.String,PrimitiveType> typeMap
private static final java.util.Map<Name,PrimitiveType> ldtMap
public static final PrimitiveType JAVA_BYTE
public static final PrimitiveType JAVA_SHORT
public static final PrimitiveType JAVA_INT
public static final PrimitiveType JAVA_CHAR
public static final PrimitiveType JAVA_LONG
public static final PrimitiveType JAVA_BIGINT
public static final PrimitiveType JAVA_FLOAT
public static final PrimitiveType JAVA_DOUBLE
public static final PrimitiveType JAVA_REAL
public static final PrimitiveType JAVA_BOOLEAN
public static final PrimitiveType JAVA_LOCSET
public static final PrimitiveType JAVA_SEQ
public static final PrimitiveType JAVA_FREE_ADT
public static final PrimitiveType JAVA_MAP
public static final PrimitiveType PROGRAM_SV
private ProgramElementName arrayElementName
private final java.lang.String name
private final Literal defaultValue
private final Name ldtName
public static PrimitiveType getPrimitiveType(java.lang.String name)
public static PrimitiveType getPrimitiveTypeByLDT(Name ldtName)
public java.lang.String getName()
getName
in interface NamedModelElement
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Literal getDefaultValue()
getDefaultValue
in interface Type
public java.lang.String getFullName()
getFullName
in interface ProgramModelElement
public java.lang.String toString()
toString
in class java.lang.Object
public ProgramElementName getArrayElementName()
public boolean isIntegerType()
public boolean isArithmeticType()
public Name getCorrespondingLDTName()