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 the ServiceLoader 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 int compareTo​(NodeNameProducer other)  
    java.lang.String mappedNodeName​(java.lang.Object nodeToMap)
    The mapping strategy for naming this node.
    default int priority()
    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

      default int compareTo​(NodeNameProducer other)
      Specified by:
      compareTo in interface java.lang.Comparable<NodeNameProducer>