Class IsSetCallDetailsCreator

java.lang.Object
org.ek9lang.compiler.phase7.calls.IsSetCallDetailsCreator

public final class IsSetCallDetailsCreator extends Object
Creates CallDetails for _isSet() method invocation. The _isSet() operator (?) checks if a value is set/valid. This is a pure function method that returns an EK9 Boolean.

When the target operand is a trait (interface), the call must use INVOKEINTERFACE in JVM bytecode, so isTraitCall must be set correctly.

  • Constructor Details

    • IsSetCallDetailsCreator

      public IsSetCallDetailsCreator()
  • Method Details

    • apply

      public CallDetails apply(String operandVariable, String operandType, boolean isTraitCall)
      Create CallDetails for _isSet() call on the specified operand.
      Parameters:
      operandVariable - The variable to call _isSet() on
      operandType - The type name of the operand
      isTraitCall - True if the operand type is a trait (requires INVOKEINTERFACE)
      Returns:
      CallDetails for the _isSet() method call