Class SourceCodeUID
java.lang.Object
org.apache.camel.quarkus.support.language.runtime.SourceCodeUID
- Direct Known Subclasses:
ExpressionUID,ScriptUID
SourceCodeUID is the root class of all implementations of a unique identifier of a source code expressed
in a given language.
To be able to retrieve a generated class thanks to its source code, an algorithm is applied to the source code to get a unique name that can be used as simple class name of the generated class.
The current algorithm, hashes first the source code to avoid having an identifier too long, then the result is encoded in base 64 to ensure that all characters are easy to read and finally converted in such way that it can be used as a Java identifier such as a class name.
-
Constructor Details
-
SourceCodeUID
-
-
Method Details
-
getSourceCode
- Returns:
- the source code to transform into an id.
-
asJavaIdentifier
- Returns:
- the source code converted as a Java identifier.
-
toString
- Overrides:
toStringin classObject- Returns:
- the value of
asJavaIdentifier().
-