An atomic type as used in XML Schema and related languages.
For example the {code xs:decimal} type is XDataType.decimalType
.
ANY_ATOMIC_TYPE_CODE
public static final int ANY_ATOMIC_TYPE_CODE
ANY_URI_TYPE_CODE
public static final int ANY_URI_TYPE_CODE
BASE64_BINARY_TYPE_CODE
public static final int BASE64_BINARY_TYPE_CODE
BOOLEAN_TYPE_CODE
public static final int BOOLEAN_TYPE_CODE
BYTE_TYPE_CODE
public static final int BYTE_TYPE_CODE
DATE_TIME_TYPE_CODE
public static final int DATE_TIME_TYPE_CODE
DATE_TYPE_CODE
public static final int DATE_TYPE_CODE
DAY_TIME_DURATION_TYPE_CODE
public static final int DAY_TIME_DURATION_TYPE_CODE
DECIMAL_ONE
public static final BigDecimal DECIMAL_ONE
DECIMAL_TYPE_CODE
public static final int DECIMAL_TYPE_CODE
DOUBLE_ONE
public static final Double DOUBLE_ONE
DOUBLE_TYPE_CODE
public static final int DOUBLE_TYPE_CODE
DOUBLE_ZERO
public static final Double DOUBLE_ZERO
DURATION_TYPE_CODE
public static final int DURATION_TYPE_CODE
ENTITY_TYPE_CODE
public static final int ENTITY_TYPE_CODE
FLOAT_ONE
public static final Float FLOAT_ONE
FLOAT_TYPE_CODE
public static final int FLOAT_TYPE_CODE
FLOAT_ZERO
public static final Float FLOAT_ZERO
G_DAY_TYPE_CODE
public static final int G_DAY_TYPE_CODE
G_MONTH_DAY_TYPE_CODE
public static final int G_MONTH_DAY_TYPE_CODE
G_MONTH_TYPE_CODE
public static final int G_MONTH_TYPE_CODE
G_YEAR_MONTH_TYPE_CODE
public static final int G_YEAR_MONTH_TYPE_CODE
G_YEAR_TYPE_CODE
public static final int G_YEAR_TYPE_CODE
HEX_BINARY_TYPE_CODE
public static final int HEX_BINARY_TYPE_CODE
IDREF_TYPE_CODE
public static final int IDREF_TYPE_CODE
ID_TYPE_CODE
public static final int ID_TYPE_CODE
INTEGER_TYPE_CODE
public static final int INTEGER_TYPE_CODE
INT_TYPE_CODE
public static final int INT_TYPE_CODE
LANGUAGE_TYPE_CODE
public static final int LANGUAGE_TYPE_CODE
LONG_TYPE_CODE
public static final int LONG_TYPE_CODE
NAME_TYPE_CODE
public static final int NAME_TYPE_CODE
NCNAME_TYPE_CODE
public static final int NCNAME_TYPE_CODE
NEGATIVE_INTEGER_TYPE_CODE
public static final int NEGATIVE_INTEGER_TYPE_CODE
NMTOKEN_TYPE_CODE
public static final int NMTOKEN_TYPE_CODE
NONNEGATIVE_INTEGER_TYPE_CODE
public static final int NONNEGATIVE_INTEGER_TYPE_CODE
NON_POSITIVE_INTEGER_TYPE_CODE
public static final int NON_POSITIVE_INTEGER_TYPE_CODE
NORMALIZED_STRING_TYPE_CODE
public static final int NORMALIZED_STRING_TYPE_CODE
NOTATION_TYPE_CODE
public static final int NOTATION_TYPE_CODE
NotationType
public static final XDataType NotationType
POSITIVE_INTEGER_TYPE_CODE
public static final int POSITIVE_INTEGER_TYPE_CODE
QNAME_TYPE_CODE
public static final int QNAME_TYPE_CODE
SHORT_TYPE_CODE
public static final int SHORT_TYPE_CODE
STRING_TYPE_CODE
public static final int STRING_TYPE_CODE
TIME_TYPE_CODE
public static final int TIME_TYPE_CODE
TOKEN_TYPE_CODE
public static final int TOKEN_TYPE_CODE
UNSIGNED_BYTE_TYPE_CODE
public static final int UNSIGNED_BYTE_TYPE_CODE
UNSIGNED_INT_TYPE_CODE
public static final int UNSIGNED_INT_TYPE_CODE
UNSIGNED_LONG_TYPE_CODE
public static final int UNSIGNED_LONG_TYPE_CODE
UNSIGNED_SHORT_TYPE_CODE
public static final int UNSIGNED_SHORT_TYPE_CODE
UNTYPED_ATOMIC_TYPE_CODE
public static final int UNTYPED_ATOMIC_TYPE_CODE
YEAR_MONTH_DURATION_TYPE_CODE
public static final int YEAR_MONTH_DURATION_TYPE_CODE
anyAtomicType
public static final XDataType anyAtomicType
anyURIType
public static final XDataType anyURIType
base64BinaryType
public static final XDataType base64BinaryType
booleanType
public static final XDataType booleanType
dayTimeDurationType
public static final XDataType dayTimeDurationType
decimalType
public static final XDataType decimalType
doubleType
public static final XDataType doubleType
durationType
public static final XDataType durationType
floatType
public static final XDataType floatType
hexBinaryType
public static final XDataType hexBinaryType
stringStringType
public static final XDataType stringStringType
A value implemented as java.lang.String.
Can be cast from CharSequence.
stringType
public static final XDataType stringType
untypedAtomicType
public static final XDataType untypedAtomicType
yearMonthDurationType
public static final XDataType yearMonthDurationType
cast
public Object cast(Object value)
castable
public boolean castable(Object value)
coerceFromObject
public Object coerceFromObject(Object obj)
Convert an object to a value of this Type.
Throw a ClassCastException when this is not possible.
- coerceFromObject in interface Type
compare
public int compare(Type other)
Return a numeric code showing "subtype" relationship:
1: if other is a pure subtype of this;
0: if has the same values;
-1: if this is a pure subtype of other;
-2: if they have values in common but neither is a subtype of the other;
-3: if the types have no values in common.
"Same member" is rather loose; by "A is a subtype of B"
we mean that all instance of A can be "widened" to B.
More formally, A.compare(B) returns:
1: all B values can be converted to A without a coercion failure
(i.e. a ClassCastException or overflow or major loss of information),
but not vice versa.
0: all A values can be converted to B without a coercion failure
and vice versa;
-1: all A values can be converted to B without a coercion failure
not not vice versa;
-2: there are (potentially) some A values that can be converted to B,
and some B values can be converted to A;
-3: there are no A values that can be converted to B, and neither
are there any B values that can be converted to A.
- compare in interface Type
emitCoerceFromObject
public void emitCoerceFromObject(CodeAttr code)
Compile code to coerce/convert from Object to this type.
- emitCoerceFromObject in interface Type
emitCoerceToObject
public void emitCoerceToObject(CodeAttr code)
Compile code to convert a object of this type on the stack to Object.
- emitCoerceToObject in interface Type
getImplementationType
public Type getImplementationType()
The type used to implement types not natively understood by the JVM.
Usually, the identity function. However, a language might handle
union types or template types or type expressions calculated at
run time. In that case return the type used at the JVM level,
and known at compile time.
- getImplementationType in interface TypeValue
- getImplementationType in interface Type
getReflectClass
public java.lang.Class getReflectClass()
Get the java.lang.Class object for the representation type.
- getReflectClass in interface Type
isInstance
public boolean isInstance(Object obj)
- isInstance in interface Type
makeDouble
public static Double makeDouble(double value)
makeFloat
public static Float makeFloat(float value)
print
public void print(Object value,
Consumer out)
toString
public String toString(Object value)
valueOf
public Object valueOf(String value)