Class BinaryExpressionTransformer
java.lang.Object
org.codehaus.groovy.transform.sc.transformers.BinaryExpressionTransformer
Rewrites binary expressions into forms that generate better static-compilation bytecode.
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryExpressionTransformer(StaticCompilationTransformer staticCompilationTransformer) Creates a binary-expression transformer backed by the owning static compilation transformer. -
Method Summary
Modifier and TypeMethodDescriptionTransforms a binary expression when a static-compilation-specific optimization applies.
-
Constructor Details
-
BinaryExpressionTransformer
Creates a binary-expression transformer backed by the owning static compilation transformer.- Parameters:
staticCompilationTransformer- the shared transformer context
-
-
Method Details
-
transformBinaryExpression
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
-