Interface KotlinCodeGenerationSpiRegistry
-
- All Implemented Interfaces:
public interface KotlinCodeGenerationSpiRegistry
The registry provides access to all registered KotlinCodeGenerationSpi instances. For simplified usage, the instances are separated into strategies and processors.
While processors or optional, strategies must not be empty, the concept of code generation is useless without at least on build plan.
Hint: Extracted to interface, so we could have multiple implementations. The main use case will be to wrap the results of java.util.ServiceLoader, see io.toolisticon.kotlin.generation.spi.registry.KotlinCodeGenerationServiceLoader.
-
-
Method Summary
Modifier and Type Method Description abstract KClass<?>
getContextTypeUpperBound()
All spi instances define a KotlinCodeGenerationSpi.contextType to indicate the context they are operating on. abstract KotlinCodeGenerationStrategyList
getStrategies()
All registered KotlinCodeGenerationStrategy instances, wrapped in a KotlinCodeGenerationStrategyList. abstract KotlinCodeGenerationProcessorList
getProcessors()
All registered KotlinCodeGenerationProcessor instances, wrapped in a KotlinCodeGenerationProcessorList. -
-
Method Detail
-
getContextTypeUpperBound
abstract KClass<?> getContextTypeUpperBound()
All spi instances define a KotlinCodeGenerationSpi.contextType to indicate the context they are operating on. The registries upper bound defines what contextTypes are allowed in this registry. Especially useful when dealing with context hierarchies.
-
getStrategies
abstract KotlinCodeGenerationStrategyList getStrategies()
All registered KotlinCodeGenerationStrategy instances, wrapped in a KotlinCodeGenerationStrategyList. Must not be empty.
-
getProcessors
abstract KotlinCodeGenerationProcessorList getProcessors()
All registered KotlinCodeGenerationProcessor instances, wrapped in a KotlinCodeGenerationProcessorList. Might be empty.
-
-
-
-