Package: org.codehaus.groovy.classgen.asm

## [Java] Class BinaryExpressionWriter

- org.codehaus.groovy.classgen.asm.BinaryExpressionWriter

-     public abstract class BinaryExpressionWriter
      extends Object

  Base class for writing primitive typed operations

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static int[]` | `stdCompareCodes` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BinaryExpressionWriter(WriterController controller, MethodCaller arraySet, MethodCaller arrayGet)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `arrayGet(int operation, boolean simulate)`
    `` | `public boolean` | `arraySet(boolean simulate)`
    `` | `protected abstract void` | `doubleTwoOperands(org.objectweb.asm.MethodVisitor mv)`
    `` | `protected MethodCaller` | `getArrayGetCaller()`
    `` | `protected ClassNode` | `getArrayGetResultType()`
    `` | `protected MethodCaller` | `getArraySetCaller()`
    `` | `protected abstract int` | `getBitwiseOperationBytecode(int type)`
    `` | `protected abstract int` | `getCompareCode()`
    `` | `public WriterController` | `getController()` return writer controller
    `` | `protected abstract ClassNode` | `getDevisionOpResultType()`
    `` | `protected abstract ClassNode` | `getNormalOpResultType()`
    `` | `protected abstract int` | `getShiftOperationBytecode(int type)`
    `` | `protected abstract int` | `getStandardOperationBytecode(int type)`
    `` | `protected abstract void` | `removeTwoOperands(org.objectweb.asm.MethodVisitor mv)`
    `` | `public void` | `setArraySetAndGet(MethodCaller arraySet, MethodCaller arrayGet)`
    `` | `protected boolean` | `supportsDivision()`
    `` | `public boolean` | `write(int operation, boolean simulate)`
    `` | `protected boolean` | `writeBitwiseOp(int type, boolean simulate)` writes some the bitwise operations. type is one of BITWISE_OR, BITWISE_AND, BITWISE_XOR
    `` | `protected boolean` | `writeDivision(boolean simulate)`
    `` | `protected abstract void` | `writeMinusMinus(org.objectweb.asm.MethodVisitor mv)`
    `` | `protected abstract void` | `writePlusPlus(org.objectweb.asm.MethodVisitor mv)`
    `` | `public boolean` | `writePostOrPrefixMethod(int operation, boolean simulate)`
    `` | `protected boolean` | `writeShiftOp(int type, boolean simulate)` Write shifting operations.
    `` | `protected boolean` | `writeSpaceship(int type, boolean simulate)`
    `` | `protected boolean` | `writeStdCompare(int type, boolean simulate)` writes some int standard operations for compares
    `` | `protected boolean` | `writeStdOperators(int type, boolean simulate)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### protected static final int[] stdCompareCodes

  - ### Constructor Detail

    - #### public BinaryExpressionWriter(WriterController controller, MethodCaller arraySet, MethodCaller arrayGet)

  - ### Method Detail

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

    - #### public boolean arraySet(boolean simulate)

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

    - #### protected MethodCaller getArrayGetCaller()

    - #### protected ClassNode getArrayGetResultType()

    - #### protected MethodCaller getArraySetCaller()

    - #### protected abstract int getBitwiseOperationBytecode(int type)

    - #### protected abstract int getCompareCode()

    - #### public WriterController getController()

      return writer controller

      Since:
        2.5.0

    - #### protected abstract ClassNode getDevisionOpResultType()

    - #### protected abstract ClassNode getNormalOpResultType()

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

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

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

    - #### public void setArraySetAndGet(MethodCaller arraySet, MethodCaller arrayGet)

    - #### protected boolean supportsDivision()

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

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

      writes some the bitwise operations. type is one of BITWISE_OR, BITWISE_AND, BITWISE_XOR

      Parameters:
        `type` - the token type
      Returns:
        true if a successful bitwise operation write

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

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

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

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

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

      Write shifting operations. Type is one of LEFT_SHIFT, RIGHT_SHIFT, or RIGHT_SHIFT_UNSIGNED

      Parameters:
        `type` - the token type
      Returns:
        true on a successful shift operation write

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

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

      writes some int standard operations for compares

      Parameters:
        `type` - the token type
      Returns:
        true if a successful std operator write

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