Class TracerFactory

    • Field Detail

      • DEFAULT

        public static final TracerFactory DEFAULT
        Defines the default tracer.
      • TEMPLATELANG_TRACERS

        public static final java.util.Map<java.lang.Thread,​ITracer> TEMPLATELANG_TRACERS
      • BUILDLANG_TRACERS

        public static final java.util.Map<java.lang.Thread,​ITracer> BUILDLANG_TRACERS
      • instances

        private static java.util.Map<java.lang.Long,​TracerFactory> instances
    • Constructor Detail

      • TracerFactory

        public TracerFactory()
    • Method Detail

      • getDefaultInstance

        public static TracerFactory getDefaultInstance()
        Returns the default instance.
        Returns:
        the default instance
      • setDefaultInstance

        public static void setDefaultInstance​(TracerFactory factory)
        Defines the default instance.
        Parameters:
        factory - the new default instance (ignored if null)
      • setInstance

        public static void setInstance​(TracerFactory newInstance)
        Defines a new tracer factory for the current thread.
        Parameters:
        newInstance - the new tracer factory (null deletes a previously defined instance)
      • getInstance

        public static TracerFactory getInstance()
        Returns the tracer factory for the current thread.
        Returns:
        the current tracer factory, if there is none defined return defaultFactory
      • createTemplateLanguageTracerImpl

        public abstract ITracer createTemplateLanguageTracerImpl()
        Creates a tracer for the VIL template language.
        Returns:
        a tracer instance for the VIL template language (null will lead to the corresponding result by DEFAULT)
      • createBuildLanguageTracerImpl

        public abstract ITracer createBuildLanguageTracerImpl()
        Creates a tracer for the VIL build language.
        Returns:
        a tracer instance for the VIL build language (null will lead to the corresponding result by DEFAULT)
      • createInstantiatorTracerImpl

        public abstract IInstantiatorTracer createInstantiatorTracerImpl()
        Creates a tracer for instantiators, i.e., to send messages to the VIL output.
        Returns:
        the instantiator tracer
      • createTemplateLanguageTracer

        public static ITracer createTemplateLanguageTracer()
        Creates a tracer for the VIL template language.
        Returns:
        a tracer instance for the VIL template language
      • createBuildLanguageTracer

        public static ITracer createBuildLanguageTracer()
        Creates a tracer for the VIL build language.
        Returns:
        a tracer instance for the VIL build language
      • createInstantiatorTracer

        public static IInstantiatorTracer createInstantiatorTracer()
        Creates a tracer for instantiators.
        Returns:
        a tracer for instantiators
      • getRegisteredBuildLanguageTracer

        public static ITracer getRegisteredBuildLanguageTracer()
        Returns the currently registered build language tracer for the current thread.
        Returns:
        the currently registered build language tracer or null if there is none
      • getRegisteredTemplateLanguageTracer

        public static ITracer getRegisteredTemplateLanguageTracer()
        Returns the currently registered template language tracer for the current thread.
        Returns:
        the currently registered template language tracer or null if there is none
      • progress

        public static void progress​(int actual,
                                    int max,
                                    java.lang.String description)
        Notifies the tracer about the actual progress in order to inform the user.
        Parameters:
        actual - the actual step (negative disables display)
        max - the maximum number of steps (may vary over time, negative disables display)
        description - an optional description of the step (may be null)
      • registerProgressObserver

        public static void registerProgressObserver​(ProgressObserver observer)
        Registers the given progress reserver.
        Parameters:
        observer - the observer (ignored if null)
      • unregisterProgressObserver

        public static void unregisterProgressObserver​(ProgressObserver observer)
        Unregisters the given progress observer.
        Parameters:
        observer - the progress observer (ignored if null)