- java.lang.Object
-
- org.mal_lang.langspec.step.StepExpression
-
- Direct Known Subclasses:
StepBinaryOperation
,StepReference
,StepSubType
,StepTransitive
public abstract class StepExpression extends Object
Immutable class representing a step expression in a MAL language.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static StepExpression
fromBuilder(StepExpressionBuilder builder, Asset sourceAsset, Map<String,Asset> assets, Map<Variable,Asset> variableTargets)
Creates a newStepExpression
object from aStepExpressionBuilder
.Asset
getSourceAsset()
Returns the source asset of thisStepExpression
object.Asset
getTargetAsset()
Returns the target asset of thisStepExpression
object.abstract JsonObject
toJson()
Returns the JSON representation of thisStepExpression
object.
-
-
-
Method Detail
-
getSourceAsset
public Asset getSourceAsset()
Returns the source asset of thisStepExpression
object.- Returns:
- the source asset of this
StepExpression
object - Since:
- 1.0.0
-
getTargetAsset
public Asset getTargetAsset()
Returns the target asset of thisStepExpression
object.- Returns:
- the target asset of this
StepExpression
object - Since:
- 1.0.0
-
toJson
public abstract JsonObject toJson()
Returns the JSON representation of thisStepExpression
object.- Returns:
- the JSON representation of this
StepExpression
object - Since:
- 1.0.0
-
fromBuilder
public static StepExpression fromBuilder(StepExpressionBuilder builder, Asset sourceAsset, Map<String,Asset> assets, Map<Variable,Asset> variableTargets)
Creates a newStepExpression
object from aStepExpressionBuilder
.- Parameters:
builder
- theStepExpressionBuilder
sourceAsset
- the source asset of the step expressionassets
- all assets of the languagevariableTargets
- a map of target assets of variables- Returns:
- a new
StepExpression
object - Throws:
NullPointerException
- ifbuilder
,sourceAsset
, orassets
isnull
- Since:
- 1.0.0
-
-