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 booleanbooleanValue(java.lang.Object value)Convert an object instance to a boolean valuebytebyteValue(java.lang.Object value)Convert an object instance to a byte valuecharcharValue(java.lang.Object value)Convert an object instance to a char valuedoubledoubleValue(java.lang.Object value)Convert an object instance to a double valuefloatfloatValue(java.lang.Object value)Convert an object instance to a float valueintintValue(java.lang.Object value)Convert an object instance to an int valuebooleanisPrimitive()Indicates if this value represents a primitive type.longlongValue(java.lang.Object value)Convert an object instance to a long valueshortshortValue(java.lang.Object value)Convert an object instance to a short valuejava.lang.Class<?>type()This primtiive type'sClassinstancestatic PrimitivevalueOf(java.lang.Class<?> type)Determine the appropriatePrimitiveinstance for the specified typestatic PrimitivevalueOf(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.PrimitiveWrapperwrapper()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
Thebooleantype
-
BYTE
public static final Primitive BYTE
Thebytetype
-
CHAR
public static final Primitive CHAR
Thechartype
-
DOUBLE
public static final Primitive DOUBLE
Thedoubletype
-
FLOAT
public static final Primitive FLOAT
Thefloattype
-
INT
public static final Primitive INT
Theinttype
-
LONG
public static final Primitive LONG
Thelongtype
-
REFERENCE
public static final Primitive REFERENCE
A reference to a non primitive type
-
SHORT
public static final Primitive SHORT
Theshorttype
-
-
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
PrimitiveWrappertype 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 forintisInteger- Returns:
- The wrapper type for this primitive type
-
type
public java.lang.Class<?> type()
This primtiive type'sClassinstance- Returns:
Classinstance
-
-