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

# Class RangeExpressionTransformer

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

public class RangeExpressionTransformer extends Object
This transformer focuses on ranges to produce optimized bytecode.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RangeExpressionTransformer(StaticCompilationTransformer transformer)`
  Creates a range-expression transformer backed by the owning static compilation transformer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Expression`
  `transformRangeExpression(RangeExpression range)`
  Rewrites an `IntRange` expression into a direct constructor call when possible.

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

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

- ## Constructor Details

  - ### RangeExpressionTransformer

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

- ## Method Details

  - ### transformRangeExpression

    public Expression transformRangeExpression(RangeExpression range)
    Rewrites an `IntRange` expression into a direct constructor call when possible.
    Parameters:
      `range` - the range expression to transform
    Returns:
      the transformed expression