Package org.ek9lang.compiler.support
Class InternalNameFor
java.lang.Object
org.ek9lang.compiler.support.InternalNameFor
- All Implemented Interfaces:
BiFunction<PossibleGenericSymbol,
List<ISymbol>, String>
public class InternalNameFor
extends Object
implements BiFunction<PossibleGenericSymbol,List<ISymbol>,String>
Given some sort of generic type a function or a type with a set of 'type parameters',
create a unique internal name for that combination. So this is not a UUID, type operation.
But it means when we need to look up a 'org.ek9.lang::List or org.ek9.lang::String' if we have that
Generic type already parameterised and recorded - we can just re-use it.
This always uses fully qualified type names and then 'digests' that to produce a SHA256 hash.
This is highly unlikely to ever collide with another combination of generic types and parameters.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapply
(PossibleGenericSymbol possibleGenericSymbol, List<ISymbol> typeArguments) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
InternalNameFor
public InternalNameFor()
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceBiFunction<PossibleGenericSymbol,
List<ISymbol>, String>
-