saker.build Documentation TaskDoc JavaDoc Packages
public interface ScriptAccessProvider
Interface specifying the main access point for build script language implementations.

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(SakerEnvironment, ScriptProviderLocation) with the ExecutionScriptConfiguration.ScriptProviderLocation.getBuiltin() as the argument.

Methods
public TargetConfigurationReader
Creates an object capable of reading build script target configurations.
public ScriptModellingEngine
Creates a modelling engine for this scripting language.
public Object
Gets the object key uniquely identifying the underlying script language implementation and its version.
Creates an object capable of reading build script target configurations.

This method can never return null.

The target configuration reader.
Creates a modelling engine for this scripting language.

This method can return null if modelling is unsupported.

modellingenvironmentThe modelling environment for the created engine.
The modelling engine or null if modelling is not supported by this language.
Gets the object key uniquely identifying the underlying script language implementation and its version.

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(Object) and Object.hashCode() contract as their main purpose is to be equality compared.

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.

The script language version key.