Class KotlinCodeGenerationSpiList
-
- All Implemented Interfaces:
-
kotlin.collections.Collection,kotlin.collections.Iterable,kotlin.collections.List
public final class KotlinCodeGenerationSpiList implements List<KotlinCodeGenerationSpi<?, ?>>
A list of UnboundKotlinCodeGenerationSpi that implements the KotlinCodeGenerationSpiRegistry interface.
These are loaded via SPI using java.util.ServiceLoader, implemented via KotlinCodeGenerationSpiListSupplier.
-
-
Field Summary
Fields Modifier and Type Field Description private final KotlinCodeGenerationStrategyListstrategiesprivate final KotlinCodeGenerationProcessorListprocessorsprivate final Integersize
-
Constructor Summary
Constructors Constructor Description KotlinCodeGenerationSpiList(KotlinCodeGenerationSpi<?, ?> strategy)Creates a KotlinCodeGenerationSpiList from the given strategies and processors. KotlinCodeGenerationSpiList(List<KotlinCodeGenerationSpi<?, ?>> list)
-
Method Summary
Modifier and Type Method Description final KotlinCodeGenerationStrategyListgetStrategies()Gives all strategies from this list. final KotlinCodeGenerationProcessorListgetProcessors()Gives all processors from this list. final KotlinCodeGenerationSpiListfilter(Predicate<KotlinCodeGenerationSpi<?, ?>> filter)Returns a new KotlinCodeGenerationSpiList containing only the strategies and processors that match the given predicate. final KotlinCodeGenerationSpiListfilterNot(Predicate<KotlinCodeGenerationSpi<?, ?>> filter)Returns a new KotlinCodeGenerationSpiList containing only the strategies and processors that do not match the given predicate. StringtoString()final KotlinCodeGenerationSpiRegistryregistry()Creates a KotlinCodeGenerationSpiRegistry from this list. -
Methods inherited from class kotlin.collections.List
contains, containsAll, get, getSize, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, spliterator, subList -
Methods inherited from class kotlin.collections.Iterable
forEach -
Methods inherited from class kotlin.collections.Collection
parallelStream, stream, toArray -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
KotlinCodeGenerationSpiList
KotlinCodeGenerationSpiList(KotlinCodeGenerationSpi<?, ?> strategy)
Creates a KotlinCodeGenerationSpiList from the given strategies and processors.- Parameters:
strategy- the strategies to include in the list.
-
KotlinCodeGenerationSpiList
KotlinCodeGenerationSpiList(List<KotlinCodeGenerationSpi<?, ?>> list)
-
-
Method Detail
-
getStrategies
final KotlinCodeGenerationStrategyList getStrategies()
Gives all strategies from this list.
-
getProcessors
final KotlinCodeGenerationProcessorList getProcessors()
Gives all processors from this list.
-
filter
final KotlinCodeGenerationSpiList filter(Predicate<KotlinCodeGenerationSpi<?, ?>> filter)
Returns a new KotlinCodeGenerationSpiList containing only the strategies and processors that match the given predicate.
- Parameters:
filter- the predicate to filter the strategies and processors.- Returns:
a new KotlinCodeGenerationSpiList containing only the matching strategies and processors.
-
filterNot
final KotlinCodeGenerationSpiList filterNot(Predicate<KotlinCodeGenerationSpi<?, ?>> filter)
Returns a new KotlinCodeGenerationSpiList containing only the strategies and processors that do not match the given predicate.
- Parameters:
filter- the predicate to filter the strategies and processors.- Returns:
a new KotlinCodeGenerationSpiList containing only the non-matching strategies and processors.
-
registry
final KotlinCodeGenerationSpiRegistry registry()
Creates a KotlinCodeGenerationSpiRegistry from this list.
- Returns:
a KotlinCodeGenerationSpiRegistry containing the strategies and processors from this list.
-
-
-
-