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