Class CallableShortDisplayName

java.lang.Object
org.ek9lang.compiler.support.CallableShortDisplayName
All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>

public final class CallableShortDisplayName extends Object implements UnaryOperator<String>
THE short display name of a callable's identity: some.module::Type.method(some.module::ParamType) reads as Type.method(ParamType) - every module qualifier dropped, from the owner and from each parameter type (a parameterised type's Dict of (m::K, m::V) included) - and a compiler-made name made readable (FriendlyInternalName: _List_<digest> reads List, _Function_<digest> reads fn). Use this for a callable in a diagnostic report or a tool's answer; assist.TypeNames's unqualifiedIdentity delegates here. ShortDisplayName on the whole identity cuts at the last : inside the parameter list and leaves ParamType).

DISPLAY ONLY - never join or compare on the result.

  • Constructor Details

    • CallableShortDisplayName

      public CallableShortDisplayName()
  • Method Details

    • apply

      public String apply(String callableIdentity)
      Specified by:
      apply in interface Function<String,String>
    • withoutModuleQualifiers

      public String withoutModuleQualifiers(String callableIdentity)
      Only the first half of apply(String): every module qualifier dropped, a compiler-made name left as it is - for a caller that makes those names readable itself, with the names it knows (FriendlyInternalName.readable(name, known)).