Package org.codehaus.groovy.transform.sc.transformers

# Class BinaryExpressionTransformer

java.lang.Object
org.codehaus.groovy.transform.sc.transformers.BinaryExpressionTransformer

public class BinaryExpressionTransformer extends Object
Rewrites binary expressions into forms that generate better static-compilation bytecode.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BinaryExpressionTransformer(StaticCompilationTransformer staticCompilationTransformer)`
  Creates a binary-expression transformer backed by the owning static compilation transformer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Expression`
  `transformBinaryExpression(BinaryExpression bin)`
  Transforms a binary expression when a static-compilation-specific optimization applies.

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

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

- ## Constructor Details

  - ### BinaryExpressionTransformer

    public BinaryExpressionTransformer(StaticCompilationTransformer staticCompilationTransformer)
    Creates a binary-expression transformer backed by the owning static compilation transformer.
    Parameters:
      `staticCompilationTransformer` - the shared transformer context

- ## Method Details

  - ### transformBinaryExpression

    public Expression transformBinaryExpression(BinaryExpression bin)
    Transforms a binary expression when a static-compilation-specific optimization applies.
    Parameters:
      `bin` - the binary expression to transform
    Returns:
      the optimized expression, or the regular transformed expression when no optimization applies