T - public interface NodeFactory<T>
NodeRegistry will consult a map for an equivalent node. If an
equivalent node is found then the newly created node will be discarded and
the existing instance used.
ServiceLoader pattern to register user
implemented NodeFactories. Please read the java documentation describing the
meta-data a factory implementor must provide to register a factory using the
ServiceLoader pattern.| Modifier and Type | Method and Description |
|---|---|
T |
createNode(Map<String,Object> config,
NodeRegistry registry)
NodeFactory writer must implement this method to generate instances of
nodes.
|
default String |
factoryName() |
default void |
postInstanceRegistration(Map<String,Object> config,
NodeRegistry registry,
T instance)
Callback invoked by Fluxtion generator after the generated SEP has been
registered in the
GenerationContext |
default void |
preSepGeneration(GenerationContext context)
If the node generates a class for this SEP, this callback gives the node
access to the GenerationContext before generation.
|
default void |
setTargetLanguage(String targetLanguage)
If the node generates a class for this SEP, this callback will indicate
the desired target.
|
T createNode(Map<String,Object> config, NodeRegistry registry)
Inject
instance is created. Config variables are used to populate the
config map.config - map configurationregistry - The node registry of the current generation contextßdefault void postInstanceRegistration(Map<String,Object> config, NodeRegistry registry, T instance)
GenerationContextconfig - map configurationregistry - The node registry of the current generation contextinstance - the newly created instancedefault void setTargetLanguage(String targetLanguage)
targetLanguage - target language for generationdefault void preSepGeneration(GenerationContext context)
context - The context the Fluxtion SEC compiler usesdefault String factoryName()
Copyright © 2022. All rights reserved.