public interface EvalResult
Represents the content and metadata of a result
from a call to
eval. Also
includes some convenience methods for deserializing the result as a
String, Number, Boolean, AbstractReadHandle, or an object of any
Class which is registered by a ContentHandle.
Nested Class Summary
Nested Classes
static
enum
Convenience enum useful for strongly-typed
comparison to ensure the result is of the type expected.
Method Summary
All Methods Instance Methods Abstract Methods
Use a handle to retrieve the contents of this
result.
<T> T
An io shortcut method to get the contents as an
object of the specified type, which must be a registered
type.
This result parsed to a Boolean.
The format of this result from the Content-Type
header provided by the REST API eval endpoint.
This result parsed to a Number.
This result directly as a string.
The
EvalResult.Type
of this result from the X-Primitive header provided by the REST API
eval endpoint.
Method Details
getType
The
EvalResult.Type
of this result from the X-Primitive header provided by the REST API
eval endpoint.
Returns:
the type of this result
See Also:
getFormat
The format of this result from the Content-Type
header provided by the REST API eval endpoint.
Returns:
the format of this result
See Also:
get
Use a handle to retrieve the contents of this
result.
Type Parameters:
H - the type of AbstractReadHandle to return
Parameters:
handle - the handle to populate with the contents
of this result
Returns:
the handle populated with the contents of this result
getAs
<T> T getAs (Class <T> clazz)
An io shortcut method to get the contents as an
object of the specified type, which must be a registered
type.
Type Parameters:
T - the type of object that will be returned by
the handle registered for it
Parameters:
clazz - the Class (type). This type must be
registered by an io handle.
Returns:
an instance of the requested type populated with the contents
of this result
getString
This result directly as a string.
Returns:
this result as a string
getNumber
This result parsed to a Number.
Returns:
this result as a number
getBoolean
This result parsed to a Boolean.
Returns:
a boolean as generated by new Boolean(getString() )
Copyright (c) 2010-2026 Progress
Software Corporation and/or its subsidiaries or affiliates. All
Rights Reserved.