Top Description Fields Constructors Methods
org.codehaus.groovy.transform.sc.transformers

public Class CompareIdentityExpression

extends BinaryExpression
implements Opcodes
Class Inheritance
All Implemented Interfaces
org.objectweb.asm.Opcodes
Imports
org.codehaus.groovy.ast.ClassHelper, .GroovyCodeVisitor, org.codehaus.groovy.ast.expr.BinaryExpression, .Expression, .ExpressionTransformer, org.codehaus.groovy.classgen.AsmClassGenerator, org.codehaus.groovy.classgen.asm.WriterController, org.codehaus.groovy.syntax.Token, .Types, org.objectweb.asm.Label, .MethodVisitor, .Opcodes

Compares two objects using identity comparison. This expression will generate bytecode using the IF_ACMPNE instruction, instead of using the "equals" method that is currently mapped to "==" in Groovy. This expression should only be used to compare to objects, not primitives, and only in the context of reference equality check.

Field Summary

Modifier and TypeField and Description
private final Expression
private final Expression

Constructor Summary

AccessConstructor and Description
public
CompareIdentityExpression(final Expression leftExpression, final Expression rightExpression)

Method Summary

Modifier and TypeMethod and Description
public Expression
transformExpression(final ExpressionTransformer transformer)

Overrides org.codehaus.groovy.ast.expr.BinaryExpression.transformExpression.

Return a copy of the expression calling the transformer on any nested expressions
public void
Inherited from org.codehaus.groovy.ast.expr.BinaryExpression:
getLeftExpressiongetOperationgetRightExpressiongetTextisSafenewAssignmentExpressionnewInitializationExpressionsetLeftExpressionsetRightExpressionsetSafetoString

Field Detail

leftExpressionback to summary
private final Expression leftExpression

Hides org.codehaus.groovy.ast.expr.BinaryExpression.leftExpression.

rightExpressionback to summary
private final Expression rightExpression

Hides org.codehaus.groovy.ast.expr.BinaryExpression.rightExpression.

Constructor Detail

CompareIdentityExpressionback to summary
public CompareIdentityExpression(final Expression leftExpression, final Expression rightExpression)

Method Detail

transformExpressionback to summary
public Expression transformExpression(final ExpressionTransformer transformer)

Overrides org.codehaus.groovy.ast.expr.BinaryExpression.transformExpression.

Doc from org.codehaus.groovy.ast.expr.Expression.transformExpression.

Return a copy of the expression calling the transformer on any nested expressions

Annotations
@Override
visitback to summary
public void visit(final GroovyCodeVisitor visitor)

Overrides org.codehaus.groovy.ast.expr.BinaryExpression.visit.

Annotations
@Override