Record Class CalleeRetention.Argument

java.lang.Object
java.lang.Record
org.ek9lang.compiler.support.retention.CalleeRetention.Argument
Record Components:
holders - the holders that may come to hold it or a part of it: RetentionRule.RECEIVER or a parameter's name
ambient - it may be kept somewhere no argument names (ambient, unimplemented)
handedBack - it, or a part of it, may be the result
Enclosing class:
CalleeRetention

public static record CalleeRetention.Argument(List<String> holders, boolean ambient, boolean handedBack) extends Record
What becomes of one argument.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Kept nowhere, handed back never.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Argument(List<String> holders, boolean ambient, boolean handedBack)
    Creates an instance of a Argument record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the ambient record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the handedBack record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the holders record component.
    boolean
    Is the argument kept anywhere beyond the result.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Argument

      public Argument(List<String> holders, boolean ambient, boolean handedBack)
      Creates an instance of a Argument record class.
      Parameters:
      holders - the value for the holders record component
      ambient - the value for the ambient record component
      handedBack - the value for the handedBack record component
  • Method Details

    • kept

      public boolean kept()
      Is the argument kept anywhere beyond the result.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • holders

      public List<String> holders()
      Returns the value of the holders record component.
      Returns:
      the value of the holders record component
    • ambient

      public boolean ambient()
      Returns the value of the ambient record component.
      Returns:
      the value of the ambient record component
    • handedBack

      public boolean handedBack()
      Returns the value of the handedBack record component.
      Returns:
      the value of the handedBack record component