Package: org.codehaus.groovy.classgen.asm

## [Java] Class BinaryBooleanExpressionHelper

- org.codehaus.groovy.classgen.asm.BinaryBooleanExpressionHelper

-     public class BinaryBooleanExpressionHelper
      extends BinaryIntExpressionHelper

  Binary write operations specialised for Booleans

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class BinaryExpressionWriter` | `stdCompareCodes`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BinaryBooleanExpressionHelper(WriterController wc)` Creates a boolean-specialized binary expression helper.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `doubleTwoOperands(org.objectweb.asm.MethodVisitor mv)` * * Duplicates the two operands already on the operand stack. * * Parameters: `mv` - the current method visitor
    `` | `protected ClassNode` | `getArrayGetResultType()` * Returns: the result type produced by getArrayGetCaller()
    `` | `protected ClassNode` | `getDevisionOpResultType()` * * Returns: the result type for division operations
    `` | `protected ClassNode` | `getNormalOpResultType()` * * Returns: the result type for normal arithmetic operations
    `` | `protected int` | `getShiftOperationBytecode(int type)` * * Returns the shift opcode for the supplied token. * * Parameters: `type` - the normalized token index * Returns: the ASM opcode
    `` | `protected int` | `getStandardOperationBytecode(int type)` * * Returns the arithmetic opcode for the supplied token. * * Parameters: `type` - the normalized token index * Returns: the ASM opcode
    `` | `protected void` | `removeTwoOperands(org.objectweb.asm.MethodVisitor mv)` * * Removes the two operands already on the operand stack. * * Parameters: `mv` - the current method visitor
    `` | `protected boolean` | `writeDivision(boolean simulate)` * Writes a division operation for the current primitive type. * * Parameters: `simulate` - whether to probe support without emitting bytecode * Returns: `true` if division is supported
    `` | `protected void` | `writeMinusMinus(org.objectweb.asm.MethodVisitor mv)` * * Emits a prefix/postfix decrement. * * Parameters: `mv` - the current method visitor
    `` | `protected void` | `writePlusPlus(org.objectweb.asm.MethodVisitor mv)` * * Emits a prefix/postfix increment. * * Parameters: `mv` - the current method visitor
    `` | `public boolean` | `writePostOrPrefixMethod(int operation, boolean simulate)` * Attempts to write a postfix or prefix increment/decrement operation. * * Parameters: `operation` - the token type * `simulate` - whether to probe support without emitting bytecode * Returns: `true` if the operation is supported
    `` | `protected boolean` | `writeStdOperators(int type, boolean simulate)` * Writes a standard arithmetic operator for the current primitive type. * * Parameters: `type` - the token type * `simulate` - whether to probe support without emitting bytecode * Returns: `true` if the operation is supported

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class BinaryIntExpressionHelper` | `doubleTwoOperands, getBitwiseOperationBytecode, getCompareCode, getDevisionOpResultType, getNormalOpResultType, getShiftOperationBytecode, getStandardOperationBytecode, removeTwoOperands, supportsDivision, writeMinusMinus, writePlusPlus, writeSpaceship, writeStdCompare`
    `class BinaryExpressionWriter` | `arrayGet, arraySet, doubleTwoOperands, getArrayGetCaller, getArrayGetResultType, getArraySetCaller, getBitwiseOperationBytecode, getCompareCode, getController, getDevisionOpResultType, getNormalOpResultType, getShiftOperationBytecode, getStandardOperationBytecode, removeTwoOperands, setArraySetAndGet, supportsDivision, write, writeBitwiseOp, writeDivision, writeMinusMinus, writePlusPlus, writePostOrPrefixMethod, writeShiftOp, writeSpaceship, writeStdCompare, writeStdOperators`

- - ### Constructor Detail

    - #### public BinaryBooleanExpressionHelper(WriterController wc)

      Creates a boolean-specialized binary expression helper.

      Parameters:
        `wc` - the active writer controller

  - ### Method Detail

    - #### protected void doubleTwoOperands(org.objectweb.asm.MethodVisitor mv)

      * * Duplicates the two operands already on the operand stack. * *

      Parameters:
        `mv` - the current method visitor

    - #### protected ClassNode getArrayGetResultType()

      *

      Returns:
        the result type produced by getArrayGetCaller()

    - #### protected ClassNode getDevisionOpResultType()

      * *

      Returns:
        the result type for division operations

    - #### protected ClassNode getNormalOpResultType()

      * *

      Returns:
        the result type for normal arithmetic operations

    - #### protected int getShiftOperationBytecode(int type)

      * * Returns the shift opcode for the supplied token. * *

      Parameters:
        `type` - the normalized token index *
      Returns:
        the ASM opcode

    - #### protected int getStandardOperationBytecode(int type)

      * * Returns the arithmetic opcode for the supplied token. * *

      Parameters:
        `type` - the normalized token index *
      Returns:
        the ASM opcode

    - #### protected void removeTwoOperands(org.objectweb.asm.MethodVisitor mv)

      * * Removes the two operands already on the operand stack. * *

      Parameters:
        `mv` - the current method visitor

    - #### protected boolean writeDivision(boolean simulate)

      * Writes a division operation for the current primitive type. * *

      Parameters:
        `simulate` - whether to probe support without emitting bytecode *
      Returns:
        `true` if division is supported

    - #### protected void writeMinusMinus(org.objectweb.asm.MethodVisitor mv)

      * * Emits a prefix/postfix decrement. * *

      Parameters:
        `mv` - the current method visitor

    - #### protected void writePlusPlus(org.objectweb.asm.MethodVisitor mv)

      * * Emits a prefix/postfix increment. * *

      Parameters:
        `mv` - the current method visitor

    - #### public boolean writePostOrPrefixMethod(int operation, boolean simulate)

      * Attempts to write a postfix or prefix increment/decrement operation. * *

      Parameters:
        `operation` - the token type *
        `simulate` - whether to probe support without emitting bytecode *
      Returns:
        `true` if the operation is supported

    - #### protected boolean writeStdOperators(int type, boolean simulate)

      * Writes a standard arithmetic operator for the current primitive type. * *

      Parameters:
        `type` - the token type *
        `simulate` - whether to probe support without emitting bytecode *
      Returns:
        `true` if the operation is supported