Class Source<I>
java.lang.Object
ca.mcscert.jpipe.compiler.model.Source<I>
- Type Parameters:
I- type produced for the downstream transformation.
- Direct Known Subclasses:
FileSource
First step of a compilation chain: reads an input file and produces the
initial value fed to the first
Transformation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface for theof(Source.Provider)factory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <R> ChainBuilder<I, R> andThen(Transformation<I, R> next) DSL entry-point: combine this source with the first transformation to start building a compilation chain.static <I> Source<I> of(Source.Provider<I> provider) Create aSourcefrom a lambda or method reference.abstract IprovideFrom(String sourceName) ReadsourceNameand produce the initial pipeline value.
-
Constructor Details
-
Source
public Source()
-
-
Method Details
-
of
Create aSourcefrom a lambda or method reference. -
provideFrom
ReadsourceNameand produce the initial pipeline value.- Parameters:
sourceName- path to the input file.- Returns:
- an instance of
I. - Throws:
IOException- if the file cannot be read.
-
andThen
DSL entry-point: combine this source with the first transformation to start building a compilation chain.- Type Parameters:
R- output type ofnext.- Parameters:
next- the transformation to apply to this source's output.- Returns:
- a
ChainBuilderaccumulating further steps.
-