Class EnumSwitchCase
java.lang.Object
org.jfuncmachine.compiler.model.SourceElement
org.jfuncmachine.compiler.model.expr.EnumSwitchCase
Defines a case value for an enum switch statement containing a target value
and an expression to be executed if the switch value matches the case value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ExpressionThe expression to execute if the switch value equals this case valuefinal StringThe string name of an enum value of the switch target's enum classFields inherited from class org.jfuncmachine.compiler.model.SourceElement
filename, lineNumber -
Constructor Summary
ConstructorsConstructorDescriptionEnumSwitchCase(String target, Expression expr) Create a switch case that matches an enum fieldEnumSwitchCase(String target, Expression expr, String filename, int lineNumber) Create a switch case that matches an enum field -
Method Summary
Methods inherited from class org.jfuncmachine.compiler.model.SourceElement
generateException
-
Field Details
-
target
The string name of an enum value of the switch target's enum class -
expr
The expression to execute if the switch value equals this case value
-
-
Constructor Details
-
EnumSwitchCase
Create a switch case that matches an enum field- Parameters:
target- The enum name that this case matchesexpr- The expression to execute if the switch value equals this case value
-
EnumSwitchCase
Create a switch case that matches an enum field- Parameters:
target- The enum name that this case matchesexpr- The expression to execute if the switch value equals this case valuefilename- The source filename containing this caselineNumber- The line number in the source filename where this case starts
-