Class CoverageIdentity

java.lang.Object
org.ek9lang.compiler.phase7.generator.CoverageIdentity
All Implemented Interfaces:
Function<ISymbol,String>

public final class CoverageIdentity extends Object implements Function<ISymbol,String>
THE join key for a construct - the display name (CoverageDisplayName) minus its one cosmetic exception. Hold an instance.

Use this whenever a construct must be MATCHED against data gathered elsewhere (input variety, complexity, any per-construct report); use CoverageDisplayName only to show a human a name. They differ for exactly one shape: a constructor renders bare as Counter for readability, but every other producer names it Counter.Counter, so joining on the display form made every constructor silently miss its row. An application's _prepare keeps the bare application name (it runs the application's body); its _decommission takes the (close) form.

Deliberately NOT ISymbol.getFullyQualifiedName(), which is a different thing again: for a method it yields module::classify, dropping the enclosing type, and for a free function it yields the synthetic module::_call. Neither can be joined on.

  • Constructor Details

    • CoverageIdentity

      public CoverageIdentity()
  • Method Details

    • apply

      public String apply(ISymbol operationSymbol)
      The join key of a function/method symbol.
      Specified by:
      apply in interface Function<ISymbol,String>
      Parameters:
      operationSymbol - the symbol whose identity is needed; must not be null
      Returns:
      Aggregate.member for aggregate members (constructors included), else the bare name