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

## [Java] Class CompareIdentityExpression

- org.codehaus.groovy.transform.sc.transformers.CompareIdentityExpression

-     public class CompareIdentityExpression
      extends BinaryExpression

  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.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class Expression` | `EMPTY_ARRAY`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CompareIdentityExpression(Expression leftExpression, boolean eq, Expression rightExpression)` Creates an identity comparison between two expressions.
    `CompareIdentityExpression(Expression leftExpression, Expression rightExpression)` Creates an identity-equality comparison between two expressions.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `isEq()` Indicates whether this expression checks identity equality rather than inequality.
    `` | `public void` | `setType(ClassNode type)` Prevents changing the fixed boolean result type of this expression.
    `` | `public Expression` | `transformExpression(ExpressionTransformer transformer)` Transforms both operands while preserving identity-comparison semantics.
    `` | `public void` | `visit(GroovyCodeVisitor visitor)` Emits direct reference-comparison bytecode for this expression.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class BinaryExpression` | `getLeftExpression, getOperation, getRightExpression, getText, isSafe, newAssignmentExpression, newInitializationExpression, setLeftExpression, setRightExpression, setSafe, toString, transformExpression, visit`
    `class Expression` | `getType, setType, transformExpression, transformExpressions, transformExpressions`
    `class AnnotatedNode` | `addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`
    `class ASTNode` | `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit`

- - ### Constructor Detail

    - #### public CompareIdentityExpression(Expression leftExpression, boolean eq, Expression rightExpression)

      Creates an identity comparison between two expressions.

      Parameters:
        `leftExpression` - the left operand
        `eq` - `true` for `===`; `false` for `!==`
        `rightExpression` - the right operand

    - #### public CompareIdentityExpression(Expression leftExpression, Expression rightExpression)

      Creates an identity-equality comparison between two expressions.

      Parameters:
        `leftExpression` - the left operand
        `rightExpression` - the right operand

  - ### Method Detail

    - #### public boolean isEq()

      Indicates whether this expression checks identity equality rather than inequality.

      Returns:
        `true` for `===`; `false` for `!==`

    - #### public void setType(ClassNode type)

      Prevents changing the fixed boolean result type of this expression.

      throws:
        UnsupportedOperationException always
      Parameters:
        `type` - ignored

    - #### public Expression transformExpression(ExpressionTransformer transformer)

      Transforms both operands while preserving identity-comparison semantics.

      Parameters:
        `transformer` - the expression transformer to apply
      Returns:
        a transformed identity-comparison expression

    - #### public void visit(GroovyCodeVisitor visitor)

      Emits direct reference-comparison bytecode for this expression.

      Parameters:
        `visitor` - the visitor to accept