public class CastNode extends Object implements Node
Includes an extension to support casting a String
to any supported field type
via FieldType.fromString(java.lang.String)
, for example (java.time.Duration)"PT24H"
.
Constructor and Description |
---|
CastNode(ClassNode typeNode,
Node target)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Value |
evaluate(ParseSession session)
Evaluate this node.
|
Class<?> |
getType(ParseSession session)
Get the type of this node's value.
|
public Class<?> getType(ParseSession session)
Node
If the type is unknown, Object.class
should be returned.
public Value evaluate(ParseSession session)
Node
Copyright © 2022. All rights reserved.