Package com.fluxtion.builder.generation
Interface NodeNameProducer
- All Superinterfaces:
java.lang.Comparable<NodeNameProducer>
public interface NodeNameProducer extends java.lang.Comparable<NodeNameProducer>
Implementing this interface allow users to extend the generation of the SEP
with customisable variable names for nodes. A default naming strategy will be
used if the registered NodeNameProducer returns null.
An optional priority() can be returned to Fluxtion generator,
allowing control of naming strategy resolution.
Registering factories
Fluxtion employs theServiceLoader pattern to register user
implemented NodeNameProducer's. Please read the java documentation describing
the meta-data a factory implementor must provide to register a factory using
the ServiceLoader pattern.- Author:
- Greg Higgins
-
Method Summary
Modifier and Type Method Description default intcompareTo(NodeNameProducer other)java.lang.StringmappedNodeName(java.lang.Object nodeToMap)The mapping strategy for naming this node.default intpriority()The priority of this naming strategy.
-
Method Details
-
mappedNodeName
java.lang.String mappedNodeName(java.lang.Object nodeToMap)The mapping strategy for naming this node. The name returned will be used in the generated source code as the variable name of the node.- Parameters:
nodeToMap- incoming node- Returns:
- the name of the node
-
priority
default int priority()The priority of this naming strategy. Default value = 1000.- Returns:
- naming strategy priority.
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<NodeNameProducer>
-