Package org.codehaus.groovy.classgen.asm

# Class BinaryExpressionMultiTypeDispatcher

java.lang.Object
org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
org.codehaus.groovy.classgen.asm.BinaryExpressionMultiTypeDispatcher

Direct Known Subclasses:
  `StaticTypesBinaryExpressionMultiTypeDispatcher`

public class BinaryExpressionMultiTypeDispatcher extends BinaryExpressionHelper
This class is for internal use only! This class will dispatch to the right type adapters according to the kind of binary expression that is provided.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected BinaryExpressionWriter[]`
  `binExpWriter`
  `static final Map<ClassNode,Integer>`
  `typeMap`
  `static final String[]`
  `typeMapKeyNames`

  ### Fields inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionHelper

  `controller`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BinaryExpressionMultiTypeDispatcher(WriterController wc)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `assignToArray(Expression orig, Expression receiver, Expression index, Expression rhsValueLoader, boolean safe)`
  `protected boolean`
  `doPrimitiveCompare(ClassNode leftType, ClassNode rightType, BinaryExpression binExp)`
  `protected boolean`
  `doPrimtiveCompare(ClassNode leftType, ClassNode rightType, BinaryExpression binExp)`
  Deprecated.
  `protected void`
  `evaluateBinaryExpression(String message, BinaryExpression binExp)`
  `protected void`
  `evaluateBinaryExpressionWithAssignment(String method, BinaryExpression binExp)`
  `protected void`
  `evaluateCompareExpression(MethodCaller compareMethod, BinaryExpression binExp)`
  `protected void`
  `evaluateCompoundAssign(String assignName, String baseName, BinaryExpression binExp)`
  GEP-15: dynamic-mode compound-assign codegen.
  `protected int`
  `getOperandType(ClassNode type)`
  `protected BinaryExpressionWriter[]`
  `initializeDelegateHelpers()`
  `protected void`
  `writePostOrPrefixMethod(int op, String method, Expression expression, Expression orig)`

  ### Methods inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionHelper

  `eval, evaluateArrayAssignmentWithOperator, evaluateElvisEqual, evaluateEqual, evaluatePostfixMethod, evaluatePrefixMethod, evaluateTernary, getController, getIsCaseMethod`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### binExpWriter

    protected BinaryExpressionWriter[] binExpWriter

  - ### typeMap

    public static final Map<ClassNode,Integer> typeMap

  - ### typeMapKeyNames

    public static final String[] typeMapKeyNames

- ## Constructor Details

  - ### BinaryExpressionMultiTypeDispatcher

    public BinaryExpressionMultiTypeDispatcher(WriterController wc)

- ## Method Details

  - ### initializeDelegateHelpers

    protected BinaryExpressionWriter[] initializeDelegateHelpers()

  - ### getOperandType

    protected int getOperandType(ClassNode type)

  - ### doPrimtiveCompare

    @Deprecated protected boolean doPrimtiveCompare(ClassNode leftType, ClassNode rightType, BinaryExpression binExp)
    Deprecated.

  - ### doPrimitiveCompare

    protected boolean doPrimitiveCompare(ClassNode leftType, ClassNode rightType, BinaryExpression binExp)

  - ### evaluateCompareExpression

    protected void evaluateCompareExpression(MethodCaller compareMethod, BinaryExpression binExp)
    Overrides:
      `evaluateCompareExpression` in class `BinaryExpressionHelper`

  - ### evaluateBinaryExpression

    protected void evaluateBinaryExpression(String message, BinaryExpression binExp)
    Overrides:
      `evaluateBinaryExpression` in class `BinaryExpressionHelper`

  - ### evaluateBinaryExpressionWithAssignment

    protected void evaluateBinaryExpressionWithAssignment(String method, BinaryExpression binExp)
    Overrides:
      `evaluateBinaryExpressionWithAssignment` in class `BinaryExpressionHelper`

  - ### evaluateCompoundAssign

    protected void evaluateCompoundAssign(String assignName, String baseName, BinaryExpression binExp)
    Description copied from class: `BinaryExpressionHelper`
    GEP-15: dynamic-mode compound-assign codegen. Routes through `ScriptBytecodeAdapter.compoundAssign(Object, Object, String, String)` which dispatches to `assignName` when the receiver responds to it, and falls back to `baseName` otherwise. The caller stores the helper's return value into the LHS — for the in-place branch this is a no-op store of the receiver back to itself; for the fallback branch it is the usual "x = x.op(y)" assignment.
    Overrides:
      `evaluateCompoundAssign` in class `BinaryExpressionHelper`

  - ### assignToArray

    protected void assignToArray(Expression orig, Expression receiver, Expression index, Expression rhsValueLoader, boolean safe)
    Overrides:
      `assignToArray` in class `BinaryExpressionHelper`

  - ### writePostOrPrefixMethod

    protected void writePostOrPrefixMethod(int op, String method, Expression expression, Expression orig)
    Overrides:
      `writePostOrPrefixMethod` in class `BinaryExpressionHelper`