@ProviderType
public interface RuntimeObjectModel
RuntimeObjectModel
provides various utility object inspection & conversion methods that can be applied to runtime
objects when executing HTL scripts.Modifier and Type | Method and Description |
---|---|
boolean |
isCollection(java.lang.Object target)
Checks if an object is a
Collection or is backed by one. |
boolean |
isDate(java.lang.Object target)
Checks if the provided object represents a date or calendar.
|
boolean |
isNumber(java.lang.Object target)
Checks if the provided object represents a number or not.
|
boolean |
isPrimitive(java.lang.Object obj)
Checks if the provided object represents a primitive data type or not.
|
java.lang.Object |
resolveProperty(java.lang.Object target,
java.lang.Object property)
Resolve a property of a target object and return its value.
|
boolean |
toBoolean(java.lang.Object object)
Convert the given object to a boolean value
|
java.util.Collection<java.lang.Object> |
toCollection(java.lang.Object object)
Force the conversion of the object to a collection
|
java.util.Date |
toDate(java.lang.Object object)
Convert the given object to a
Date object |
java.time.Instant |
toInstant(java.lang.Object object)
Convert the given object to an
Instant object |
java.util.Map |
toMap(java.lang.Object object)
Force the conversion of the target object to a map
|
java.lang.Number |
toNumber(java.lang.Object object)
Coerce the object to a numeric value
|
java.lang.String |
toString(java.lang.Object target)
Convert the given object to a string.
|
boolean isPrimitive(java.lang.Object obj)
obj
- the target objecttrue
if the target
is a primitive, false
otherwiseboolean isCollection(java.lang.Object target)
Collection
or is backed by one.target
- the target objecttrue
if the target
is a collection or is backed by one, false
otherwiseboolean isNumber(java.lang.Object target)
target
- the target objecttrue
if the target
is a number, false
otherwiseboolean isDate(java.lang.Object target)
target
- the target objecttrue
if the target
is a date or calendar, false
otherwisejava.lang.Object resolveProperty(java.lang.Object target, java.lang.Object property)
target
- the target objectproperty
- the property to be resolvedboolean toBoolean(java.lang.Object object)
object
- the target objectjava.lang.Number toNumber(java.lang.Object object)
object
- the target objectjava.util.Date toDate(java.lang.Object object)
Date
objectobject
- the target objectobject
java.time.Instant toInstant(java.lang.Object object)
Instant
objectobject
- the target objectobject
java.lang.String toString(java.lang.Object target)
target
- the target objectjava.util.Collection<java.lang.Object> toCollection(java.lang.Object object)
object
- the target objectjava.util.Map toMap(java.lang.Object object)
object
- the target objectCopyright © 2022 The Apache Software Foundation. All rights reserved.