-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78e67ac
commit 4aecccb
Showing
3 changed files
with
419 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
.../generation/src/main/java/com/fluxtion/example/reference/generation/SampleAotBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.fluxtion.example.reference.generation; | ||
|
||
import com.fluxtion.compiler.EventProcessorConfig; | ||
import com.fluxtion.compiler.Fluxtion; | ||
import com.fluxtion.compiler.FluxtionCompilerConfig; | ||
import com.fluxtion.compiler.FluxtionGraphBuilder; | ||
import com.fluxtion.compiler.builder.dataflow.DataFlow; | ||
|
||
import java.nio.file.Path; | ||
|
||
//Uncomment to disable discovery for this FluxtionGraphBuilder | ||
//@com.fluxtion.runtime.annotations.builder.Disabled | ||
public class SampleAotBuilder implements FluxtionGraphBuilder { | ||
@Override | ||
public void buildGraph(EventProcessorConfig eventProcessorConfig) { | ||
DataFlow.subscribe(String.class) | ||
.mapToInt(String::length); | ||
} | ||
|
||
@Override | ||
public void configureGeneration(FluxtionCompilerConfig compilerConfig) { | ||
compilerConfig.setClassName("SampleAotBuilderProcessor"); | ||
compilerConfig.setPackageName("com.fluxtion.example.reference.generation.genoutput"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
Fluxtion.scanAndCompileFluxtionBuilders(Path.of("target/classes/").toFile()); | ||
} | ||
} |
Oops, something went wrong.