Record Class FieldClassifier.FieldCounts

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.FieldClassifier.FieldCounts
Record Components:
serviceFieldCount - Number of fields whose type is abstract/interface
dataFieldCount - Number of fields whose type is concrete
byDelegatedFieldCount - Number of fields used in 'by' delegation
serviceFields - List of service-type field symbols
dataFields - List of data-type field symbols
byDelegatedFields - Set of field names used in 'by' delegation
Enclosing class:
FieldClassifier

static record FieldClassifier.FieldCounts(int serviceFieldCount, int dataFieldCount, int byDelegatedFieldCount, List<ISymbol> serviceFields, List<ISymbol> dataFields, Set<String> byDelegatedFields) extends Record
Result of field classification for an aggregate.
  • Constructor Details

    • FieldCounts

      FieldCounts(int serviceFieldCount, int dataFieldCount, int byDelegatedFieldCount, List<ISymbol> serviceFields, List<ISymbol> dataFields, Set<String> byDelegatedFields)
      Creates an instance of a FieldCounts record class.
      Parameters:
      serviceFieldCount - the value for the serviceFieldCount record component
      dataFieldCount - the value for the dataFieldCount record component
      byDelegatedFieldCount - the value for the byDelegatedFieldCount record component
      serviceFields - the value for the serviceFields record component
      dataFields - the value for the dataFields record component
      byDelegatedFields - the value for the byDelegatedFields record component
  • Method Details

    • 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.
    • serviceFieldCount

      public int serviceFieldCount()
      Returns the value of the serviceFieldCount record component.
      Returns:
      the value of the serviceFieldCount record component
    • dataFieldCount

      public int dataFieldCount()
      Returns the value of the dataFieldCount record component.
      Returns:
      the value of the dataFieldCount record component
    • byDelegatedFieldCount

      public int byDelegatedFieldCount()
      Returns the value of the byDelegatedFieldCount record component.
      Returns:
      the value of the byDelegatedFieldCount record component
    • serviceFields

      public List<ISymbol> serviceFields()
      Returns the value of the serviceFields record component.
      Returns:
      the value of the serviceFields record component
    • dataFields

      public List<ISymbol> dataFields()
      Returns the value of the dataFields record component.
      Returns:
      the value of the dataFields record component
    • byDelegatedFields

      public Set<String> byDelegatedFields()
      Returns the value of the byDelegatedFields record component.
      Returns:
      the value of the byDelegatedFields record component