Enum Class JavaType
- All Implemented Interfaces:
Serializable,Comparable<JavaType>,Constable
An enum for all java types known to the generator.
- Version:
- "Id: $
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionjava.math.BigDecimal.java.lang.Boolean.primitive boolean.java.lang.Byte.primitive byte.primitive byte array.java.lang.Char.primitive char.java.util.Date.java.lang.Double.primitive double.java.lang.Enum.java.lang.Float.primitive float.java.lang.Integer.primitive int.java.lang.Long.primitive long.java.lang.Short.primitive short.java.lang.String. -
Method Summary
Modifier and TypeMethodDescriptionReturns the class name.Returns the class name, if necessary qualified with the package name.Returns the package prefix.booleanisNumber()Returns whether the type is a number.booleanReturns whether the type is a primitive type.static JavaTypeReturns the enum constant of this class with the specified name.static JavaType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
java.lang.String. -
BIG_DECIMAL
java.math.BigDecimal. -
BOOLEAN_PRIMITIVE
primitive boolean. -
BOOLEAN_OBJECT
java.lang.Boolean. -
BYTE_PRIMITIVE
primitive byte. -
BYTE_OBJECT
java.lang.Byte. -
SHORT_PRIMITIVE
primitive short. -
SHORT_OBJECT
java.lang.Short. -
INTEGER_PRIMITIVE
primitive int. -
INTEGER_OBJECT
java.lang.Integer. -
LONG_PRIMITIVE
primitive long. -
LONG_OBJECT
java.lang.Long. -
FLOAT_PRIMITIVE
primitive float. -
FLOAT_OBJECT
java.lang.Float. -
DOUBLE_PRIMITIVE
primitive double. -
DOUBLE_OBJECT
java.lang.Double. -
CHAR_PRIMITIVE
primitive char. -
CHAR_OBJECT
java.lang.Char. -
BYTE_PRIMITIVE_ARRAY
primitive byte array. -
DATE
java.util.Date. -
ENUM
java.lang.Enum.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isPrimitive
public boolean isPrimitive()Returns whether the type is a primitive type.- Returns:
- true if the type is a primitive type, false otherwise.
-
isNumber
public boolean isNumber()Returns whether the type is a number.- Returns:
- true if the type is a number, false otherwise.
-
getClassName
Returns the class name.- Returns:
- the unqualified class name.
-
getPackagePrefix
Returns the package prefix.- Returns:
- the package prefix, or null.
-
getFullClassName
Returns the class name, if necessary qualified with the package name.- Returns:
- the full class name.
-