- 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 StepExpressionfromBuilder(StepExpressionBuilder builder, Asset sourceAsset, Map<String,Asset> assets, Map<Variable,Asset> variableTargets)Creates a newStepExpressionobject from aStepExpressionBuilder.AssetgetSourceAsset()Returns the source asset of thisStepExpressionobject.AssetgetTargetAsset()Returns the target asset of thisStepExpressionobject.abstract JsonObjecttoJson()Returns the JSON representation of thisStepExpressionobject.
-
-
-
Method Detail
-
getSourceAsset
public Asset getSourceAsset()
Returns the source asset of thisStepExpressionobject.- Returns:
- the source asset of this
StepExpressionobject - Since:
- 1.0.0
-
getTargetAsset
public Asset getTargetAsset()
Returns the target asset of thisStepExpressionobject.- Returns:
- the target asset of this
StepExpressionobject - Since:
- 1.0.0
-
toJson
public abstract JsonObject toJson()
Returns the JSON representation of thisStepExpressionobject.- Returns:
- the JSON representation of this
StepExpressionobject - Since:
- 1.0.0
-
fromBuilder
public static StepExpression fromBuilder(StepExpressionBuilder builder, Asset sourceAsset, Map<String,Asset> assets, Map<Variable,Asset> variableTargets)
Creates a newStepExpressionobject from aStepExpressionBuilder.- Parameters:
builder- theStepExpressionBuildersourceAsset- the source asset of the step expressionassets- all assets of the languagevariableTargets- a map of target assets of variables- Returns:
- a new
StepExpressionobject - Throws:
NullPointerException- ifbuilder,sourceAsset, orassetsisnull- Since:
- 1.0.0
-
-