Module org.kink_lang.kink
Class KeyStrSupplier
java.lang.Object
org.kink_lang.kink.internal.compile.javaclassir.KeyStrSupplier
Generates unique key strings.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
KeyStrSupplier
public KeyStrSupplier()
-
-
Method Details
-
newKeyStr
Returns a key str unique inthis
supplier.For the first invocation with base=Foo, this method returns "#Foo".
For the second invocation with base=Foo, this method returns "#Foo#1", for the third, returns "#Foo#2" ...
Why it does not add the count for the first invocation? → Answer: to make it easy to write tests of codegen.
- Parameters:
base
- the base of the key str. It must not contain "#".- Returns:
- a uniuqe key str within
this
supplier.
-