public enum ParmType extends java.lang.Enum<ParmType>
NUMBERTYPE
would indicate that an INTEGER
,
INT64
or DECIMAL
could all be used as a parameter).Enum Constant and Description |
---|
BDT |
BDT_ARRAY |
BDT_VARARGS |
BIN |
BLOB |
CHAR |
CLOB |
COMHANDLE |
DATE |
DEC |
DT |
DTTZ |
HANDLE |
INT |
INT64 |
JOBJECT |
LC |
LOG |
MEM |
NUM |
NUM_VARARGS |
OBJECT |
RAW |
RECID |
RECORD |
ROWID |
ROWID_ARRAY |
TEXT |
TEXT_VARARGS |
WID |
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<?> |
cls
The P2J wrapper class for this type (may be an array with the component a P2J wrapper type.
|
Modifier and Type | Method and Description |
---|---|
static ParmType |
fromClass(java.lang.Class<?> ctype)
Resolve the
constant from the class representing the given wrapper type. |
static ParmType |
fromString(java.lang.String ptype)
Resolve the
constant from the string representation of the given wrapper
type. |
java.lang.Class<?> |
getParamType()
Get the parameter's
type . |
boolean |
isVarargs()
Check if the type is a varargs type.
|
static boolean |
typesMatch(ParmType candidate,
ParmType expected)
Check if the candidate and expected types match.
|
static ParmType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ParmType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ParmType CHAR
public static final ParmType LC
public static final ParmType CLOB
public static final ParmType BLOB
public static final ParmType TEXT
public static final ParmType TEXT_VARARGS
public static final ParmType INT
public static final ParmType DEC
public static final ParmType INT64
public static final ParmType NUM
public static final ParmType NUM_VARARGS
public static final ParmType LOG
public static final ParmType DATE
public static final ParmType DT
public static final ParmType DTTZ
public static final ParmType COMHANDLE
public static final ParmType HANDLE
public static final ParmType OBJECT
public static final ParmType JOBJECT
public static final ParmType WID
public static final ParmType RECID
public static final ParmType RECORD
public static final ParmType ROWID
public static final ParmType ROWID_ARRAY
public static final ParmType MEM
public static final ParmType RAW
public static final ParmType BIN
public static final ParmType BDT
public static final ParmType BDT_ARRAY
public static final ParmType BDT_VARARGS
private java.lang.Class<?> cls
public static ParmType[] values()
for (ParmType c : ParmType.values()) System.out.println(c);
public static ParmType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static boolean typesMatch(ParmType candidate, ParmType expected)
candidate
- The candidate type. May be null.expected
- The expected type. May not be null.true
if they match (i.e. the expected is a super-class of candidate)public static ParmType fromString(java.lang.String ptype)
constant
from the string representation of the given wrapper
type.ptype
- The name of the class of a P2J wrapper type.public static ParmType fromClass(java.lang.Class<?> ctype)
constant
from the class representing the given wrapper type.ctype
- Class representing a P2J wrapper type.null
if not found.public boolean isVarargs()
true
if the type is a vararg.public java.lang.Class<?> getParamType()
type
.