Interface KotlinCodeGenerationSpi
-
- All Implemented Interfaces:
-
java.util.function.BiPredicate
,kotlin.Comparable
public interface KotlinCodeGenerationSpi<CONTEXT extends KotlinCodeGenerationContext<CONTEXT>, INPUT extends Object> implements Comparable<KotlinCodeGenerationSpi<?, ?>>, BiPredicate<CONTEXT, Any>
Root interface for code generation spi.
There are two kinds of spi:
strategies
processors
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
KotlinCodeGenerationSpi.Companion
-
Method Summary
Modifier and Type Method Description Integer
compareTo(KotlinCodeGenerationSpi<?, ?> other)
Compare by order to sort list of SPI instances. Boolean
test(CONTEXT ctx, Object input)
If true
, the spi instance is executed, else ignored.abstract String
getName()
abstract KClass<out INPUT>
getInputType()
The type of the generic INPUT, used to filter relevant instances. abstract KClass<out CONTEXT>
getContextType()
The type of the generic CONTEXT, used to filter relevant instances. abstract Integer
getOrder()
Order is used to sort spi instances. -
-
Method Detail
-
compareTo
Integer compareTo(KotlinCodeGenerationSpi<?, ?> other)
Compare by order to sort list of SPI instances.
-
getInputType
abstract KClass<out INPUT> getInputType()
The type of the generic INPUT, used to filter relevant instances.
-
getContextType
abstract KClass<out CONTEXT> getContextType()
The type of the generic CONTEXT, used to filter relevant instances.
-
-
-
-