Package com.anylogic.engine.database
- All Known Implementing Classes:
Agent
,Experiment
,ExperimentCompareRuns
,ExperimentMultipleRuns
,ExperimentOptimization
,ExperimentParamVariation
,ExperimentRunFast
,ExperimentSimulation
,FlowchartBlock
,Utilities
@AnyLogicInternalAPI public interface CodeValueExecutor
This class is internal and shouldn't be called by user.
it may be removed/renamed in future.
Class containing some executable action / evaluatable expression code inside.
it may be removed/renamed in future.
Class containing some executable action / evaluatable expression code inside.
- Author:
- AnyLogic North America, LLC https://anylogic.com
Modifier and Type | Method | Description |
---|---|---|
<T> T | executeExpression |
Executes/evaluates the given code, e.g.
|
<T> T executeExpression(Class<T> returnType, String code, Object... argDescriptors)
Executes/evaluates the given code, e.g.
If provided, uses the given arguments, specified in the form of pair: name, value. In the following example:
the code will operate with variables agent and index of types Agent and Integer
executeExpression( "exponential( 10 )" )
.If provided, uses the given arguments, specified in the form of pair: name, value. In the following example:
executeExpression( String.class, "agent.getName() + index", "agent", agent, "index", i - 1 )
the code will operate with variables agent and index of types Agent and Integer
- Parameters:
returnType
- return-type of expression, may bevoid.class
- for actionscode
- java code of expression / actionargDescriptors
- array of pairs: argName1, argValue1, argName2, argValue2, ...- Returns:
- evaluated expression result