Record Class NamespacePackageTelemetry

java.lang.Object
java.lang.Record
org.sonar.plugins.python.indexer.NamespacePackageTelemetry
Record Components:
packagesWithInit - The number of packages with an __init__.py file.
packagesWithoutInit - The number of packages without an __init__.py file.
duplicatePackagesWithoutInit - The number of packages without an __init__.py file that appear multiple times. Each occurrence increments this count.
namespacePackagesInRegularPackage - The number of packages without an __init__.py file that have at least one parent with an __init__.py file.

public record NamespacePackageTelemetry(int packagesWithInit, int packagesWithoutInit, int duplicatePackagesWithoutInit, int namespacePackagesInRegularPackage) extends Record
Telemetry data for namespace packages.
  • Constructor Details

    • NamespacePackageTelemetry

      public NamespacePackageTelemetry(int packagesWithInit, int packagesWithoutInit, int duplicatePackagesWithoutInit, int namespacePackagesInRegularPackage)
      Creates an instance of a NamespacePackageTelemetry record class.
      Parameters:
      packagesWithInit - the value for the packagesWithInit record component
      packagesWithoutInit - the value for the packagesWithoutInit record component
      duplicatePackagesWithoutInit - the value for the duplicatePackagesWithoutInit record component
      namespacePackagesInRegularPackage - the value for the namespacePackagesInRegularPackage record component
  • Method Details

    • empty

      public static NamespacePackageTelemetry empty()
    • 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. All components in this record class are compared with '=='.
      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.
    • packagesWithInit

      public int packagesWithInit()
      Returns the value of the packagesWithInit record component.
      Returns:
      the value of the packagesWithInit record component
    • packagesWithoutInit

      public int packagesWithoutInit()
      Returns the value of the packagesWithoutInit record component.
      Returns:
      the value of the packagesWithoutInit record component
    • duplicatePackagesWithoutInit

      public int duplicatePackagesWithoutInit()
      Returns the value of the duplicatePackagesWithoutInit record component.
      Returns:
      the value of the duplicatePackagesWithoutInit record component
    • namespacePackagesInRegularPackage

      public int namespacePackagesInRegularPackage()
      Returns the value of the namespacePackagesInRegularPackage record component.
      Returns:
      the value of the namespacePackagesInRegularPackage record component