ILanguageComponentFactory¶
-
public interface
ILanguageComponentFactory
¶ Interface for creating
ComponentCreationConfig
s which are used to load language components into aILanguageService
.
Methods¶
createConfig¶
-
ComponentCreationConfig
createConfig
(IComponentCreationConfigRequest request)¶ Creates a language component configuration from a valid request.
Parameters: - request – Request to create a component configuration for.
Throws: - MetaborgException – When
request
is not valid, or when there are further configuration issues in the request.
Returns: A language component configuration which is passed to
ILanguageService.add(ComponentCreationConfig)
to load the component.
createConfigs¶
-
Collection<ComponentCreationConfig>
createConfigs
(Iterable<IComponentCreationConfigRequest> requests)¶ Creates language component configurations from valid requests.
Parameters: - requests – Requests to create component configurations for.
Throws: - MetaborgException – When a request is not valid, or when there are further configuration issues in a request.
Returns: Language component configurations which are passed to
ILanguageService.add(ComponentCreationConfig)
to load the component.
requestAllInDirectory¶
-
Collection<IComponentCreationConfigRequest>
requestAllInDirectory
(FileObject directory)¶ Creates component creation configuration requests by scanning given directory and all descendants for compiled language components.
Parameters: - directory – Directory to start scanning for compiled language components.
Throws: - MetaborgException – When
directory
is not a directory, does not exist; or when an unexpected I/O error occurs.
Returns: Requests which can be checked for validity. Pass valid requests to
createConfig(IComponentCreationConfigRequest)
to create a language component configuration.
requestFromArchive¶
-
IComponentCreationConfigRequest
requestFromArchive
(FileObject archiveFile)¶ Create a component creation configuration request from a ZIP archive file that contains a compiled language component.
Parameters: - archiveFile – ZIP archive file that contains the compiled language component.
Throws: - MetaborgException – When
archiveFile
is not a file, does not exist, or does not contain a compiled language component; or when an unexpected I/O error occurs.
Returns: Request which can be checked for validity. Pass valid requests to
createConfig(IComponentCreationConfigRequest)
to create a language component configuration.
requestFromDirectory¶
-
IComponentCreationConfigRequest
requestFromDirectory
(FileObject directory)¶ Create a component creation configuration request from a directory that contains a compiled language component.
Parameters: - directory – Directory that contains the compiled language component.
Throws: - MetaborgException – When
directory
is not a directory, does not exist, or does not contain a compiled language component; or when an unexpected I/O error occurs.
Returns: Request which can be checked for validity. Pass valid requests to
createConfig(IComponentCreationConfigRequest)
to create a language component configuration.