Class BoolTrue
java.lang.Object
org.jfuncmachine.compiler.model.SourceElement
org.jfuncmachine.compiler.model.expr.bool.BooleanExpr
org.jfuncmachine.compiler.model.expr.bool.BoolTrue
A false constant for boolean expressions
-
Field Summary
FieldsFields inherited from class org.jfuncmachine.compiler.model.expr.bool.BooleanExpr
labelFields inherited from class org.jfuncmachine.compiler.model.SourceElement
filename, lineNumber -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeSequence(BooleanExpr trueNext, BooleanExpr falseNext, List<BooleanExpr> tests) Compute a sequence of tests to determine if this expression is true or falsevoidgenerate(ClassGenerator generator, Environment env, BooleanExpr next) Generate Java bytecode for this constant In the boolean expressions, a true constant means to take the true path.invert()Invert this expression, which may involve reversing comparisons or changing and to or with inverted tests, etc.Remove any not expressions from a tree of boolean expressions by inverting the expression under the notvoidreset()Resets any values modified during code generationMethods inherited from class org.jfuncmachine.compiler.model.SourceElement
generateException
-
Field Details
-
truePath
The test to execute if this one is true
-
-
Constructor Details
-
BoolTrue
Create a true boolean constant expression- Parameters:
filename- The source file containing this constantlineNumber- The line number in the source file where this constant is declared
-
-
Method Details
-
invert
Description copied from class:BooleanExprInvert this expression, which may involve reversing comparisons or changing and to or with inverted tests, etc.- Specified by:
invertin classBooleanExpr- Returns:
- An inverted boolean expression
-
removeNot
Description copied from class:BooleanExprRemove any not expressions from a tree of boolean expressions by inverting the expression under the not- Specified by:
removeNotin classBooleanExpr- Returns:
- a BooleanExpr with any nested Not constructions removed
-
reset
public void reset()Description copied from class:BooleanExprResets any values modified during code generation- Overrides:
resetin classBooleanExpr
-
computeSequence
public BooleanExpr computeSequence(BooleanExpr trueNext, BooleanExpr falseNext, List<BooleanExpr> tests) Description copied from class:BooleanExprCompute a sequence of tests to determine if this expression is true or false- Specified by:
computeSequencein classBooleanExpr- Parameters:
trueNext- The next expression to evaluate if this expression is truefalseNext- The next expression to evaluate if this expression is falsetests- An accumulator for the tests to be executed- Returns:
- The beginning of the sequence
-
generate
Generate Java bytecode for this constant In the boolean expressions, a true constant means to take the true path.- Parameters:
generator- The class generator that is generating the current classenv- The environment containing all visible variablesnext- The next boolean expr in the chain
-