Language implementations provide this interface for accessing the various functions a script language implementations should have.
Build language implementations and their versions are uniquely identified by their accessor keys.
Implementations should have a public no-arg constructor.
This class might by used by the ServiceLoader mechanism.
The script access provider for the built-in language is available using
ExecutionScriptConfiguration.getScriptAccessorProvider(
public TargetConfigurationReader | Creates an object capable of reading build script target configurations. |
public ScriptModellingEngine | createModellingEngine( Creates a modelling engine for this scripting language. |
public Object | Gets the object key uniquely identifying the underlying script language implementation and its version. |
This method can never return null
.
This method can return null
if modelling is unsupported.
null
if modelling is not supported by this language.The purpose of script accessor keys is to uniquely identify an implementation of a script language. This can ensure that if two accessor keys equal, then the corresponding access providers will behave the same way. I.e. they will parse the same scripts with the same results.
This accessor keys are used during incremental compilation to ensure that the scripts haven't changed between executions.
The return value is required to adhere the Object.equals(
The return value is required to implement Object.toString() so that it returns a string representation identifying this script language implementation. A version number, or build date can be appropriate for this. Note that all the fields which are part of the equality check should be present in the string representation somehow.
The return value should be serializable, preferably implement Externalizable.
Implementations should consider creating a custom class for the return value, which can ensure classpath compatibility for incremental builds.