public class ObjectFunctions
extends java.lang.Object
Constructor and Description |
---|
ObjectFunctions() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
cast(ExecutionContext ctx,
java.lang.Object object,
Type type)
If the type of the object is compatible with the specified type, the function returns the
object casted to the type.
|
java.lang.Object |
clone(ExecutionContext ctx,
java.lang.Object object)
If the object is
RecordHolder a copy is created otherwise the same object is
returned. |
java.lang.Object |
error(ExecutionContext ctx,
java.lang.String code)
Throws an error with the specified code.
|
java.lang.Object |
error(ExecutionContext ctx,
java.lang.String code,
java.lang.String message)
Throws an error with the specified code.
|
java.lang.Object |
ifNotNull(ExecutionContext ctx,
java.lang.Object objToCheck,
java.lang.String objToCheckName,
java.lang.Object object)
Returns object if the objToCheck is not Null.
|
java.lang.Boolean |
isInstance(ExecutionContext ctx,
java.lang.Object object,
Type type)
Returns True, if the specified object is assignment-compatible with (is kind of) type.
|
java.lang.Boolean |
isSubtype(ExecutionContext ctx,
Type subtype,
Type supertype)
Returns True, if sub type is a sub type of super type.
|
Type |
typeOf(java.lang.Object object)
Returns the type of object.
|
public java.lang.Object clone(ExecutionContext ctx, java.lang.Object object)
RecordHolder
a copy is created otherwise the same object is
returned.ctx
- object
- public java.lang.Object ifNotNull(ExecutionContext ctx, java.lang.Object objToCheck, java.lang.String objToCheckName, java.lang.Object object) throws ErrorException
ctx
- objToCheck
- objToCheckName
- object
- object
if objToCheck
is not nullErrorException
public java.lang.Boolean isSubtype(ExecutionContext ctx, Type subtype, Type supertype) throws ErrorException
ctx
- subtype
- supertype
- ErrorException
public Type typeOf(java.lang.Object object)
object
- public java.lang.Boolean isInstance(ExecutionContext ctx, java.lang.Object object, Type type) throws ErrorException
ctx
- object
- type
- ErrorException
public java.lang.Object cast(ExecutionContext ctx, java.lang.Object object, Type type) throws ErrorException
ctx
- object
- type
- ErrorException
public java.lang.Object error(ExecutionContext ctx, java.lang.String code) throws ErrorException
ctx
- code
- ErrorException
- alwayspublic java.lang.Object error(ExecutionContext ctx, java.lang.String code, java.lang.String message) throws ErrorException
ctx
- code
- message
- ErrorException
- alwaysCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.