Package oracle.dbtools.plugin.api.types
Enum Primitive
- java.lang.Object
-
- java.lang.Enum<Primitive>
-
- oracle.dbtools.plugin.api.types.Primitive
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
booleanValue(java.lang.Object value)
Convert an object instance to a boolean valuebyte
byteValue(java.lang.Object value)
Convert an object instance to a byte valuechar
charValue(java.lang.Object value)
Convert an object instance to a char valuedouble
doubleValue(java.lang.Object value)
Convert an object instance to a double valuefloat
floatValue(java.lang.Object value)
Convert an object instance to a float valueint
intValue(java.lang.Object value)
Convert an object instance to an int valueboolean
isPrimitive()
Indicates if this value represents a primitive type.long
longValue(java.lang.Object value)
Convert an object instance to a long valueshort
shortValue(java.lang.Object value)
Convert an object instance to a short valuejava.lang.Class<?>
type()
This primtiive type'sClass
instancestatic Primitive
valueOf(java.lang.Class<?> type)
Determine the appropriatePrimitive
instance for the specified typestatic Primitive
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Primitive[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.PrimitiveWrapper
wrapper()
Retrieves the equivalent wrapper type for this primitive typejava.lang.Class<?>
wrapperType()
The wrapper type associated with this type.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final Primitive BOOLEAN
Theboolean
type
-
BYTE
public static final Primitive BYTE
Thebyte
type
-
CHAR
public static final Primitive CHAR
Thechar
type
-
DOUBLE
public static final Primitive DOUBLE
Thedouble
type
-
FLOAT
public static final Primitive FLOAT
Thefloat
type
-
INT
public static final Primitive INT
Theint
type
-
LONG
public static final Primitive LONG
Thelong
type
-
REFERENCE
public static final Primitive REFERENCE
A reference to a non primitive type
-
SHORT
public static final Primitive SHORT
Theshort
type
-
-
Method Detail
-
values
public static Primitive[] 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 (Primitive c : Primitive.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Primitive 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
-
wrapper
public PrimitiveWrapper wrapper()
Retrieves the equivalent wrapper type for this primitive type- Returns:
- The
PrimitiveWrapper
type for this type
-
booleanValue
public boolean booleanValue(java.lang.Object value)
Convert an object instance to a boolean value- Parameters:
value
- The value to cast- Returns:
- The boolean representation
-
byteValue
public byte byteValue(java.lang.Object value)
Convert an object instance to a byte value- Parameters:
value
- The value to cast- Returns:
- The byte representation
-
charValue
public char charValue(java.lang.Object value)
Convert an object instance to a char value- Parameters:
value
- The value to cast- Returns:
- The char representation
-
doubleValue
public double doubleValue(java.lang.Object value)
Convert an object instance to a double value- Parameters:
value
- The value to cast- Returns:
- The double representation
-
floatValue
public float floatValue(java.lang.Object value)
Convert an object instance to a float value- Parameters:
value
- The value to cast- Returns:
- The float representation
-
intValue
public int intValue(java.lang.Object value)
Convert an object instance to an int value- Parameters:
value
- The value to cast- Returns:
- The int representation
-
isPrimitive
public final boolean isPrimitive()
Indicates if this value represents a primitive type.- Returns:
- false if this is an instance of
REFERENCE
, true otherwise
-
longValue
public long longValue(java.lang.Object value)
Convert an object instance to a long value- Parameters:
value
- The value to cast- Returns:
- The long representation
-
shortValue
public short shortValue(java.lang.Object value)
Convert an object instance to a short value- Parameters:
value
- The value to cast- Returns:
- The short representation
-
wrapperType
public java.lang.Class<?> wrapperType()
The wrapper type associated with this type. For example the wrapper type forint
isInteger
- Returns:
- The wrapper type for this primitive type
-
type
public java.lang.Class<?> type()
This primtiive type'sClass
instance- Returns:
Class
instance
-
-