public class TypeFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.function.Function<java.lang.Boolean,logical> |
BOOLEAN_INIT
Function to create and initialize a
logical instance. |
private static java.util.function.Function<java.lang.String,character> |
CHARACTER_INIT
Function to create and initialize a
character instance. |
private static java.util.function.Function<date,date> |
DATE_INIT
Function to create and initialize a
date instance. |
private static java.util.function.Function<datetime,datetime> |
DATETIME_INIT
Function to create and initialize a
datetime instance. |
private static java.util.function.Function<datetimetz,datetimetz> |
DATETIMETZ_INIT
Function to create and initialize a
datetimetz instance. |
private static java.util.function.Function<decimal,decimal> |
DECIMAL_INIT
Function to create and initialize a
decimal instance. |
private static java.util.function.Function<java.lang.Long,int64> |
INT64_INIT
Function to create and initialize a
int64 instance. |
private static java.util.function.Function<java.lang.Long,integer> |
INTEGER_INIT
Function to create and initialize a
integer instance. |
private static java.util.function.Function<java.lang.String,longchar> |
LONGCHAR_INIT
Function to create and initialize a
longchar instance. |
private static java.util.function.Function<java.lang.Long,recid> |
RECID_INIT
Function to create and initialize a
recid instance. |
Constructor and Description |
---|
TypeFactory() |
Modifier and Type | Method and Description |
---|---|
static character |
character()
Create a
character instance initialized to the default value. |
static character |
character(java.lang.String init)
Create a
character instance. |
static character[] |
characterExtent(int extent,
java.lang.String... init)
Create a
character array of the given extent. |
static character[] |
characterExtent(java.lang.String... init)
Create a
character extent using as initial values the data in the init
array. |
static comhandle |
comhandle()
Create a
comhandle instance initialized to the default value. |
static comhandle[] |
comhandleExtent()
Create a 0-length
comhandle array. |
static comhandle[] |
comhandleExtent(int extent)
Create a 0-length
comhandle array. |
static date |
date()
Create a
date instance initialized to the default value. |
static date |
date(date init)
Create a
date instance initialized to the init value. |
static date[] |
dateExtent(date... init)
Create a
date extent using as initial values the data in the init
array. |
static date[] |
dateExtent(int extent,
date... init)
Create a
date array of the given extent. |
static datetime |
datetime()
Create a
datetime instance initialized to the default value. |
static datetime |
datetime(datetime init)
Create a
datetime instance initialized to the init value. |
static datetime[] |
datetimeExtent(datetime... init)
Create a
datetime extent using as initial values the data in the init
array. |
static datetime[] |
datetimeExtent(int extent,
datetime... init)
Create a
datetime array of the given extent. |
static datetimetz |
datetimetz()
Create a
datetimetz instance initialized to the default value. |
static datetimetz |
datetimetz(datetimetz init)
Create a
datetimetz instance initialized to the init value. |
static datetimetz[] |
datetimetzExtent(datetimetz... init)
Create a
datetimetz extent using as initial values the data in the init
array. |
static datetimetz[] |
datetimetzExtent(int extent,
datetimetz... init)
Create a
datetimetz array of the given extent. |
static decimal |
decimal()
Create a
decimal instance initialized to the default value. |
static decimal |
decimal(decimal init)
Create a
decimal instance initialized to the init value. |
static decimal[] |
decimalExtent(decimal... init)
Create a
decimal extent using as initial values the data in the init
array. |
static decimal[] |
decimalExtent(int extent,
decimal... init)
Create a
decimal array of the given extent. |
static handle |
handle()
Create a
handle instance initialized to the default value. |
static handle[] |
handleExtent()
Create a 0-length
handle array. |
static handle[] |
handleExtent(int extent)
Create a
handle array of the given extent and initialize it with the default value. |
private static <T extends BaseDataType,I> |
initExtent(BaseDataType[] res,
I[] init,
java.util.function.Function<I,T> finit)
Initialize the specified array using; if there is data in the
init array for
a specified index, that will be used to initialize it. |
static <T extends BaseDataType> |
initInput(T var)
Initialize an
INPUT parameter by creating a deep copy of the specified instance. |
static <T extends BaseDataType> |
initInput(T[] var)
Initialize an
INPUT extent parameter by creating a deep copy of the specified
array. |
static <T extends BaseDataType> |
initInputOutput(InputOutputExtentParameter<T> var)
Initialize an
INPUT-OUTPUT extent parameter. |
static <T extends BaseDataType> |
initInputOutput(InputOutputExtentParameter<T> var,
int extent)
Initialize an
INPUT-OUTPUT extent parameter. |
static <T extends BaseDataType> |
initInputOutput(T var)
Initialize an
OUTPUT parameter by setting it to its default value. |
static <T extends BaseDataType> |
initOutput(boolean initDefault,
T var)
Initialize an
OUTPUT parameter by setting it either to its default value or
to unknown , depending on the state of the initDefault flag. |
static <T extends BaseDataType> |
initOutput(OutputExtentParameter<T> var)
Initialize an
OUTPUT extent parameter. |
static <T extends BaseDataType> |
initOutput(OutputExtentParameter<T> var,
int extent,
T... init)
Initialize an
OUTPUT extent parameter using the specified initializer and
extent value. |
static <T extends BaseDataType> |
initOutput(T var)
Initialize an
OUTPUT parameter by setting it to its default value. |
static <T extends BaseDataType> |
initOutput(T var,
T init)
Initialize an
OUTPUT parameter by setting it to the specified init value. |
static int64 |
int64()
Create a
int64 instance initialized to the default value. |
static int64 |
int64(java.lang.Long init)
Create a
int64 instance. |
static int64[] |
int64Extent(int extent,
java.lang.Long... init)
Create a
int64 array of the given extent. |
static int64[] |
int64Extent(java.lang.Long... init)
Create a
int64 extent using as initial values the data in the init
array. |
static integer |
integer()
Create a
integer instance initialized to the default value. |
static integer |
integer(java.lang.Long init)
Create a
integer instance. |
static integer[] |
integerExtent(int extent,
java.lang.Long... init)
Create a
integer array of the given extent. |
static integer[] |
integerExtent(java.lang.Long... init)
Create a
integer extent using as initial values the data in the init
array. |
static <V> jobject<V> |
jobject(java.lang.Class<V> cls)
Create a generic
jobject instance initialized to the default value. |
static logical |
logical()
Create a
logical instance initialized to the default value. |
static logical |
logical(java.lang.Boolean init)
Create a
logical instance. |
static logical[] |
logicalExtent(java.lang.Boolean... init)
Create a
logical extent using as initial values the data in the init
array. |
static logical[] |
logicalExtent(int extent,
java.lang.Boolean... init)
Create a
logical array of the given extent. |
static longchar |
longchar()
Create a
longchar instance initialized to the default value. |
static longchar |
longchar(java.lang.String init)
Create a
longchar instance. |
static longchar[] |
longcharExtent(int extent,
java.lang.String... init)
Create a
longchar array of the given extent. |
static longchar[] |
longcharExtent(java.lang.String... init)
Create a
longchar extent using as initial values the data in the init
array. |
static memptr |
memptr()
Create a
memptr instance initialized to the default value. |
static memptr[] |
memptrExtent()
Create a 0-length
memptr array. |
static memptr[] |
memptrExtent(int extent)
Create a
memptr array of the given extent and initialize it with the default value. |
static <V extends _BaseObject_> |
object(java.lang.Class<V> cls)
Create a generic
object instance initialized to the default value. |
static <V extends _BaseObject_> |
object(java.lang.Class<V> cls,
boolean pending)
Create a generic
object instance initialized to the default value. |
static <V extends _BaseObject_> |
objectExtent(java.lang.Class<V> cls)
Create an empty
object array (indeterminate EXTENT variable). |
static <V extends _BaseObject_> |
objectExtent(java.lang.Class<V> cls,
boolean register)
Create an empty
object array (indeterminate EXTENT variable). |
static <V extends _BaseObject_> |
objectExtent(int extent,
java.lang.Class<V> cls)
Create an
object array of the given extent and initialize it with the default value. |
static <V extends _BaseObject_> |
objectExtent(int extent,
java.lang.Class<V> cls,
boolean register)
Create an
object array of the given extent and initialize it with the default value. |
static raw |
raw()
Create a
raw instance initialized to the default value. |
static raw[] |
rawExtent()
Create a 0-length
raw array. |
static raw[] |
rawExtent(int extent)
Create a
raw array of the given extent and initialize it with the default value. |
static recid |
recid()
Create a
recid instance initialized to the default value. |
static recid |
recid(java.lang.Long init)
Create a
recid instance. |
static recid[] |
recidExtent(int extent,
java.lang.Long... init)
Create a
recid array of the given extent. |
static recid[] |
recidExtent(java.lang.Long... init)
Create a
recid extent using as initial values the data in the init
array. |
static rowid |
rowid()
Create a
rowid instance initialized to the default value. |
static rowid[] |
rowidExtent()
Create a 0-length
rowid array. |
static rowid[] |
rowidExtent(int extent)
Create a
rowid array of the given extent and initialize it with the default value. |
private static java.util.function.Function<date,date> DATE_INIT
date
instance.private static java.util.function.Function<datetime,datetime> DATETIME_INIT
datetime
instance.private static java.util.function.Function<datetimetz,datetimetz> DATETIMETZ_INIT
datetimetz
instance.private static java.util.function.Function<java.lang.Boolean,logical> BOOLEAN_INIT
logical
instance.private static java.util.function.Function<decimal,decimal> DECIMAL_INIT
decimal
instance.private static java.util.function.Function<java.lang.Long,integer> INTEGER_INIT
integer
instance.private static java.util.function.Function<java.lang.Long,int64> INT64_INIT
int64
instance.private static java.util.function.Function<java.lang.String,character> CHARACTER_INIT
character
instance.private static java.util.function.Function<java.lang.String,longchar> LONGCHAR_INIT
longchar
instance.public static <T extends BaseDataType> T initInput(T var)
INPUT
parameter by creating a deep copy of the specified instance.var
- The original instance receive as an argument.BaseDataType.deepCopy()
public static <T extends BaseDataType> T[] initInput(T[] var)
INPUT
extent parameter by creating a deep copy of the specified
array.var
- The original array instance receive as an argument.ArrayAssigner.copyOf(BaseDataType[])
public static <T extends BaseDataType> T initOutput(T var)
OUTPUT
parameter by setting it to its default value.var
- The original instance receive as an argument.public static <T extends BaseDataType> T initOutput(boolean initDefault, T var)
OUTPUT
parameter by setting it either to its default value or
to unknown
, depending on the state of the initDefault
flag.initDefault
- When true
, initialize to default init value, otherwise to unknown.var
- The original instance receive as an argument.public static <T extends BaseDataType> T initOutput(T var, T init)
OUTPUT
parameter by setting it to the specified init value.var
- The original instance receive as an argument.init
- The init instance.public static <T extends BaseDataType> T[] initOutput(OutputExtentParameter<T> var)
OUTPUT
extent parameter.var
- The original instance receive as an argument.OutputExtentParameter.initParameter()
public static <T extends BaseDataType> T[] initOutput(OutputExtentParameter<T> var, int extent, T... init)
OUTPUT
extent parameter using the specified initializer and
extent value.var
- The original instance receive as an argument.extent
- The array length.init
- The initializer array.initExtent(BaseDataType[], Object[], Function)
public static <T extends BaseDataType> T initInputOutput(T var)
OUTPUT
parameter by setting it to its default value.var
- The original instance receive as an argument.public static <T extends BaseDataType> T[] initInputOutput(InputOutputExtentParameter<T> var)
INPUT-OUTPUT
extent parameter.var
- The original instance receive as an argument.InputOutputExtentParameter.initParameter()
public static <T extends BaseDataType> T[] initInputOutput(InputOutputExtentParameter<T> var, int extent)
INPUT-OUTPUT
extent parameter.var
- The original instance receive as an argument.extent
- The array length.InputOutputExtentParameter.initParameter(int)
public static memptr memptr()
memptr
instance initialized to the default value.public static memptr[] memptrExtent(int extent)
memptr
array of the given extent and initialize it with the default value.extent
- The array length.public static memptr[] memptrExtent()
memptr
array.public static raw raw()
raw
instance initialized to the default value.public static raw[] rawExtent(int extent)
raw
array of the given extent and initialize it with the default value.extent
- The array length.public static date date()
date
instance initialized to the default value.public static date[] dateExtent(int extent, date... init)
date
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static date[] dateExtent(date... init)
date
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static date date(date init)
date
instance initialized to the init value.init
- The init value.public static datetime datetime()
datetime
instance initialized to the default value.public static datetime[] datetimeExtent(int extent, datetime... init)
datetime
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static datetime[] datetimeExtent(datetime... init)
datetime
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static datetime datetime(datetime init)
datetime
instance initialized to the init value.init
- The init value.public static datetimetz datetimetz()
datetimetz
instance initialized to the default value.public static datetimetz[] datetimetzExtent(int extent, datetimetz... init)
datetimetz
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static datetimetz[] datetimetzExtent(datetimetz... init)
datetimetz
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static datetimetz datetimetz(datetimetz init)
datetimetz
instance initialized to the init value.init
- The init value.public static <V> jobject<V> jobject(java.lang.Class<V> cls)
jobject
instance initialized to the default value.cls
- The class that will be wrapped by this object.public static <V extends _BaseObject_> object<V> object(java.lang.Class<V> cls)
object
instance initialized to the default value.cls
- The class that will be wrapped by this object.public static <V extends _BaseObject_> object<V> object(java.lang.Class<V> cls, boolean pending)
object
instance initialized to the default value.cls
- The class that will be wrapped by this object.pending
- Flag indicating if the registration must be done as 'pending' (for the next top-level block)
or in the current top-level block.public static <V extends _BaseObject_> object<V>[] objectExtent(java.lang.Class<V> cls, boolean register)
object
array (indeterminate EXTENT variable).cls
- The class that will be wrapped by the objects in this array.register
- Flag indicating if the registration must be done as 'pending' for the next top-level block.public static <V extends _BaseObject_> object<V>[] objectExtent(java.lang.Class<V> cls)
object
array (indeterminate EXTENT variable).cls
- The class that will be wrapped by the objects in this array.public static <V extends _BaseObject_> object<V>[] objectExtent(int extent, java.lang.Class<V> cls)
object
array of the given extent and initialize it with the default value.extent
- The array length.cls
- The class that will be wrapped by the objects in this array.public static <V extends _BaseObject_> object<V>[] objectExtent(int extent, java.lang.Class<V> cls, boolean register)
object
array of the given extent and initialize it with the default value.extent
- The array length.cls
- The class that will be wrapped by the objects in this array.register
- Flag indicating if the registration must be done as 'pending' for the next top-level block.public static handle handle()
handle
instance initialized to the default value.public static handle[] handleExtent()
handle
array.public static handle[] handleExtent(int extent)
handle
array of the given extent and initialize it with the default value.extent
- The array length.public static comhandle comhandle()
comhandle
instance initialized to the default value.public static comhandle[] comhandleExtent()
comhandle
array.public static comhandle[] comhandleExtent(int extent)
comhandle
array.extent
- array extentpublic static logical logical()
logical
instance initialized to the default value.public static logical[] logicalExtent(int extent, java.lang.Boolean... init)
logical
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static logical[] logicalExtent(java.lang.Boolean... init)
logical
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static logical logical(java.lang.Boolean init)
logical
instance. If the init
is null, initialize it to
unknown
. Otherwise, initialize it to the init value.init
- The init value.public static decimal decimal()
decimal
instance initialized to the default value.public static decimal[] decimalExtent(int extent, decimal... init)
decimal
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static decimal[] decimalExtent(decimal... init)
decimal
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static decimal decimal(decimal init)
decimal
instance initialized to the init value.init
- The init value.public static integer integer()
integer
instance initialized to the default value.public static integer[] integerExtent(int extent, java.lang.Long... init)
integer
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static integer[] integerExtent(java.lang.Long... init)
integer
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static integer integer(java.lang.Long init)
integer
instance. If the init
is null, initialize it to
unknown
. Otherwise, initialize it to the init value.init
- The init value.public static int64 int64()
int64
instance initialized to the default value.public static int64[] int64Extent(int extent, java.lang.Long... init)
int64
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static int64[] int64Extent(java.lang.Long... init)
int64
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static int64 int64(java.lang.Long init)
int64
instance. If the init
is null, initialize it to
unknown
. Otherwise, initialize it to the init value.init
- The init value.public static rowid rowid()
rowid
instance initialized to the default value.public static rowid[] rowidExtent(int extent)
rowid
array of the given extent and initialize it with the default value.extent
- The array length.public static recid recid()
recid
instance initialized to the default value.public static recid[] recidExtent(int extent, java.lang.Long... init)
recid
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static recid[] recidExtent(java.lang.Long... init)
recid
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static recid recid(java.lang.Long init)
recid
instance. If the init
is null, initialize it to
unknown
. Otherwise, initialize it to the init value.init
- The init value.public static character character()
character
instance initialized to the default value.public static character[] characterExtent(int extent, java.lang.String... init)
character
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static character[] characterExtent(java.lang.String... init)
character
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static character character(java.lang.String init)
character
instance. If the init
is null, initialize it to
unknown
. Otherwise, initialize it to the init value.init
- The init value.public static longchar longchar()
longchar
instance initialized to the default value.public static longchar[] longcharExtent(int extent, java.lang.String... init)
longchar
array of the given extent. If there is data in the
init
array for a specified index, that will be used to initialize it.
Otherwise, if the init array is empty, default initializer will be used; if the init array
is not empty, all indices which don't have a counterpart will use the last entry in
this array.extent
- The array length.init
- The initializer array.public static longchar[] longcharExtent(java.lang.String... init)
longchar
extent using as initial values the data in the init
array. If the init array is empty, a non-initialized (0-extent) array will be returned.init
- The initializer array.public static longchar longchar(java.lang.String init)
longchar
instance. If the init
is null, initialize it to
unknown
. Otherwise, initialize it to the init value.init
- The init value.private static <T extends BaseDataType,I> void initExtent(BaseDataType[] res, I[] init, java.util.function.Function<I,T> finit)
init
array for
a specified index, that will be used to initialize it. Otherwise, if the init array is
empty, default initializer will be used; if the init array is not empty, all indices which
don't have a counterpart will use the last entry in this array.res
- The array to be initialized.init
- The initializer.finit
- Function which will create either a default value or an initialized value,
depending on the given argument.