Constructor and Description |
---|
MethodInvokeNode(Class<?> klass,
String name,
List<Node> paramNodes)
Constructor for static method invocation.
|
MethodInvokeNode(Node targetNode,
String name,
List<Node> paramNodes)
Constructor for instance method invocation.
|
Modifier and Type | Method and Description |
---|---|
Value |
evaluate(ParseSession session)
Evaluate this node.
|
protected io.permazen.parse.expr.AbstractInvokeNode.ParamInfo |
evaluateParams(ParseSession session)
Evaluate parameters and parameter types.
|
protected void |
fixupTypeInferringNodes(ParseSession session,
io.permazen.parse.expr.AbstractInvokeNode.ParamInfo paramInfo,
T executable) |
protected void |
fixupVarArgs(io.permazen.parse.expr.AbstractInvokeNode.ParamInfo paramInfo,
T executable) |
Class<?> |
getType(ParseSession session)
Get the type of this node's value.
|
public MethodInvokeNode(Class<?> klass, String name, List<Node> paramNodes)
klass
- class containing static methodname
- static method nameparamNodes
- method parameterspublic Value evaluate(ParseSession session)
Node
session
- parse sessionpublic Class<?> getType(ParseSession session)
Node
If the type is unknown, Object.class
should be returned.
session
- parse sessionprotected io.permazen.parse.expr.AbstractInvokeNode.ParamInfo evaluateParams(ParseSession session)
TypeInferringNode
s are not evaluated, instead they are left as null and the corresponding
parameter type is set to the special value MethodUtil.FunctionalType
. Null parameters have
their parameter type set to MethodUtil.NullType
.
session
- parse sessionprotected void fixupVarArgs(io.permazen.parse.expr.AbstractInvokeNode.ParamInfo paramInfo, T executable)
protected void fixupTypeInferringNodes(ParseSession session, io.permazen.parse.expr.AbstractInvokeNode.ParamInfo paramInfo, T executable)
Copyright © 2022. All rights reserved.