Services¶
This manual describes all services in Spoofax Core. A service is a class (and typically a singleton) that provides a single piece of functionality to the Spoofax Core system. Services can be accessed through facades, or injected through dependency injection.
Both MetaBorg, Spoofax, non-meta, and meta services are described. Each service has a corresponding interface which is the Java API to that service. Some services have specializations that specialize the interface in order to provide more specialized return types or additional method arguments.
MetaBorg services¶
Basic¶
Basic services provide low-level functionality.
-
Resource service
Interface: org.metaborg.core.resource.IResourceService
-
Source text service
Interface: org.metaborg.core.source.ISourceTextService
Language¶
Language services provide all language, language implementation, and language component related functionality.
-
Language service
Interface: org.metaborg.core.language.ILanguageService
-
Language identifier service
Interface: org.metaborg.core.language.ILanguageIdentifierService
-
Language discovery service
Interface: org.metaborg.core.language.ILanguageDiscoveryService
-
Dialect service
Interface: org.metaborg.core.language.dialect.IDialectService
-
Language paths service
Interface: org.metaborg.core.build.paths.ILanguagePathService
-
Language dependency service
Interface: org.metaborg.core.build.dependency.IDependencyService
Language processing¶
Language processing services provide services for the processing of files of a language.
-
Syntax service
Interface: org.metaborg.core.syntax.ISyntaxService
Specialization: org.metaborg.spoofax.core.syntax.ISpoofaxSyntaxService
-
Analysis service
Interface: org.metaborg.core.analysis.IAnalysisService
Specialization: org.metaborg.spoofax.core.analysis.ISpoofaxAnalysisService
-
Transformation service
Interface: org.metaborg.core.transform.ITransformService
Specialization: org.metaborg.spoofax.core.transform.ISpoofaxTransformService
-
Unit service
Interface: org.metaborg.core.unit.IUnitService
Specialization: org.metaborg.spoofax.core.unit.ISpoofaxUnitService
-
Input unit service
Sub-interface of the unit service that only provides methods for creating input units. Use this sub-interface when you only require creating input units for parsing.
Interface: org.metaborg.core.unit.IInputUnitService
Specialization: org.metaborg.spoofax.core.unit.ISpoofaxInputUnitService
-
-
Builder
Interface: org.metaborg.core.build.IBuilder
Specialization: org.metaborg.spoofax.core.build.ISpoofaxBuilder
-
Parse result processor
Interface: org.metaborg.core.processing.parse.IParseResultProcessor
Specialization: org.metaborg.spoofax.core.processing.parse.ISpoofaxParseResultProcessor
-
Analysis result processor
Interface: org.metaborg.core.processing.analyze.IAnalysisResultProcessor
Specialization: org.metaborg.spoofax.core.processing.analyze.ISpoofaxAnalysisResultProcessor
Context¶
Context services in MetaBorg provide a context for language processing tasks.
-
Project service
Interface: org.metaborg.core.project.IProjectService
Specialization: org.metaborg.core.project.ISimpleProjectService
-
Context service
Interface: org.metaborg.core.context.IContextService
Editor services¶
Editor services provide functionality for source code editors.
-
Categorizer service
Interface: org.metaborg.core.style.ICategorizerService
Specialization: org.metaborg.spoofax.core.style.ISpoofaxCategorizerService
-
Styler service
Interface: org.metaborg.core.style.IStylerService
Specialization: org.metaborg.spoofax.core.style.ISpoofaxStylerService
-
Tracing service
Interface: org.metaborg.core.tracing.ITracingService
Specialization: org.metaborg.spoofax.core.tracing.ISpoofaxTracingService
-
Hover tooltip service
Interface: org.metaborg.core.tracing.IHoverService
Specialization: org.metaborg.spoofax.core.tracing.ISpoofaxHoverService
-
Reference resolution service
Interface: org.metaborg.core.tracing.IResolverService
Specialization: org.metaborg.spoofax.core.tracing.ISpoofaxResolverService
-
Outline service
Interface: org.metaborg.core.outline.IOutlineService
Specialization: org.metaborg.spoofax.core.outline.ISpoofaxOutlineService
-
Completion service
Interface: org.metaborg.core.completion.ICompletionService
Specialization: org.metaborg.spoofax.core.completion.ISpoofaxCompletionService
-
Menu service
Interface: org.metaborg.core.menu.IMenuService
Configuration¶
Configuration services provide read and write access to project and language component configuration at runtime.
See the language development manual on configuration for documentation about the Spoofax language specification configuration, which is a superset of the language specification, component, and project configuration.
-
Project configuration
-
Service
Interface: org.metaborg.core.config.IProjectConfigService
-
Builder
Interface: org.metaborg.core.config.IProjectConfigBuilder
-
Writer
Interface: org.metaborg.core.config.IProjectConfigWriter
-
-
Language component configuration
-
Service
Interface: org.metaborg.core.config.ILanguageComponentConfigService
-
Builder
Interface: org.metaborg.core.config.ILanguageComponentConfigBuilder
-
Writer
Interface: org.metaborg.core.config.ILanguageComponentConfigWriter
-
Spoofax services¶
-
Term factory service
Interface: org.metaborg.spoofax.core.terms.ITermFactoryService
-
Stratego runtime service
Interface: org.metaborg.spoofax.core.stratego.IStrategoRuntimeService
-
Common Stratego functionality
Interface: org.metaborg.spoofax.core.stratego.IStrategoCommon
MetaBorg-meta services¶
Project¶
Project services in MetaBorg-meta provide a context for language specification builds.
-
Language specification project service
Interface: org.metaborg.meta.core.project.ILanguageSpecService
Specialization: org.metaborg.spoofax.meta.core.project.ISpoofaxLanguageSpecService
Configuration¶
Configuration services for language specifications. See the language development manual on configuration for documentation about the Spoofax language specification configuration.
-
Language specification configuration
-
Service
Interface: org.metaborg.meta.core.config.ILanguageSpecConfigService
Specialization: org.metaborg.spoofax.meta.core.config.ISpoofaxLanguageSpecConfigService
-
Builder
Interface: org.metaborg.meta.core.config.ILanguageSpecConfigBuilder
Specialization: org.metaborg.spoofax.meta.core.config.ISpoofaxLanguageSpecConfigBuilder
-
Writer
Interface: org.metaborg.meta.core.config.ILanguageSpecConfigWriter
Specialization: org.metaborg.spoofax.meta.core.config.ISpoofaxLanguageSpecConfigWriter
-
Spoofax-meta services¶
-
Language specification builder
Interface: org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder