Class ChainrEntry


  • public class ChainrEntry
    extends java.lang.Object
    Helper class that encapsulates the information one of the individual transform entries in the Chainr spec's list.
    • Constructor Summary

      Constructors 
      Constructor Description
      ChainrEntry​(int index, java.lang.Object chainrEntryObj, java.lang.ClassLoader classLoader)
      Process an element from the Chainr Spec into a ChainrEntry class.
    • Field Detail

      • STOCK_TRANSFORMS

        public static final java.util.Map<java.lang.String,​java.lang.String> STOCK_TRANSFORMS
        Map transform "operation" names to the classes that handle them
      • index

        private final int index
      • spec

        private final java.lang.Object spec
      • operationClassName

        private final java.lang.String operationClassName
      • joltTransformClass

        private final java.lang.Class<? extends JoltTransform> joltTransformClass
      • isSpecDriven

        private final boolean isSpecDriven
    • Constructor Detail

      • ChainrEntry

        public ChainrEntry​(int index,
                           java.lang.Object chainrEntryObj,
                           java.lang.ClassLoader classLoader)
        Process an element from the Chainr Spec into a ChainrEntry class. This method tries to validate the syntax of the Chainr spec, whereas the ChainrInstantiator deals with loading the Transform classes.
        Parameters:
        chainrEntryObj - the unknown Object from the Chainr list
        index - the index of the chainrEntryObj, used in reporting errors
    • Method Detail

      • extractOperationString

        private java.lang.String extractOperationString​(java.util.Map<java.lang.String,​java.lang.Object> chainrEntryMap)
      • loadJoltTransformClass

        private java.lang.Class<? extends JoltTransform> loadJoltTransformClass​(java.lang.ClassLoader classLoader)
      • getErrorMessageIndexSuffix

        public java.lang.String getErrorMessageIndexSuffix()
        Generate an error message suffix what lists the index of the ChainrEntry in the overall ChainrSpec.
      • getSpec

        public java.lang.Object getSpec()
        Returns:
        Spec for the transform, can be null
      • getJoltTransformClass

        public java.lang.Class<? extends JoltTransform> getJoltTransformClass()
        Returns:
        Class instance specified by this ChainrEntry
      • isSpecDriven

        public boolean isSpecDriven()
        Returns:
        true if the Jolt Transform specified by this ChainrEntry implements the SpecTransform interface