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.

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

Takes the operand type as a SYMBOL, not a name. ? is user-overridable (override operator ?), so its purity and complexity are properties of the user's code and must be READ off the resolved operator - this previously hard-coded (true, 0), reporting every user's impure or complex ? as pure with zero complexity.

  • Constructor Details

  • Method Details

    • apply

      public CallDetails apply(String operandVariable, ISymbol operandSymbol, boolean isTraitCall)
      Create CallDetails for _isSet() call on the specified operand.
      Parameters:
      operandVariable - The variable to call _isSet() on
      operandSymbol - The operand symbol - its type both names the target and supplies the metadata
      isTraitCall - True if the operand type is a trait (requires INVOKEINTERFACE)
      Returns:
      CallDetails for the _isSet() method call