Class ProcessorConfigurationUtils


  • public final class ProcessorConfigurationUtils
    extends Object

    Utility class containing methods relating to the configuration of processors (e.g. wrapping).

    This class is mainly for internal use.

    Since:
    3.0.0
    Author:
    Daniel Fernández
    • Method Detail

      • wrap

        public static IElementProcessor wrap​(IElementProcessor processor,
                                             IProcessorDialect dialect)

        Wraps an implementation of IElementProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be wrapped.
        dialect - the dialect this processor was configured for.
        Returns:
        the wrapped processor.
      • wrap

        public static ICDATASectionProcessor wrap​(ICDATASectionProcessor processor,
                                                  IProcessorDialect dialect)

        Wraps an implementation of ICDATASectionProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be wrapped.
        dialect - the dialect this processor was configured for.
        Returns:
        the wrapped processor.
      • wrap

        public static ICommentProcessor wrap​(ICommentProcessor processor,
                                             IProcessorDialect dialect)

        Wraps an implementation of ICommentProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be wrapped.
        dialect - the dialect this processor was configured for.
        Returns:
        the wrapped processor.
      • wrap

        public static IDocTypeProcessor wrap​(IDocTypeProcessor processor,
                                             IProcessorDialect dialect)

        Wraps an implementation of IDocTypeProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be wrapped.
        dialect - the dialect this processor was configured for.
        Returns:
        the wrapped processor.
      • wrap

        public static ITextProcessor wrap​(ITextProcessor processor,
                                          IProcessorDialect dialect)

        Wraps an implementation of ITextProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be wrapped.
        dialect - the dialect this processor was configured for.
        Returns:
        the wrapped processor.
      • wrap

        public static IXMLDeclarationProcessor wrap​(IXMLDeclarationProcessor processor,
                                                    IProcessorDialect dialect)

        Wraps an implementation of IXMLDeclarationProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be wrapped.
        dialect - the dialect this processor was configured for.
        Returns:
        the wrapped processor.
      • wrap

        public static IPreProcessor wrap​(IPreProcessor preProcessor,
                                         IProcessorDialect dialect)

        Wraps an implementation of IPreProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        preProcessor - the pre-processor to be wrapped.
        dialect - the dialect this pre-processor was configured for.
        Returns:
        the wrapped pre-processor.
      • wrap

        public static IPostProcessor wrap​(IPostProcessor postProcessor,
                                          IProcessorDialect dialect)

        Wraps an implementation of IPostProcessor into an object that adds some information required internally (like e.g. the dialect this processor was registered for).

        This method is meant for internal use only.

        Parameters:
        postProcessor - the post-processor to be wrapped.
        dialect - the dialect this post-processor was configured for.
        Returns:
        the wrapped post-processor.
      • unwrap

        public static IElementProcessor unwrap​(IElementProcessor processor)

        Unwraps a wrapped implementation of IElementProcessor.

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be unwrapped.
        Returns:
        the unwrapped processor.
      • unwrap

        public static ICommentProcessor unwrap​(ICommentProcessor processor)

        Unwraps a wrapped implementation of ICommentProcessor.

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be unwrapped.
        Returns:
        the unwrapped processor.
      • unwrap

        public static IDocTypeProcessor unwrap​(IDocTypeProcessor processor)

        Unwraps a wrapped implementation of IDocTypeProcessor.

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be unwrapped.
        Returns:
        the unwrapped processor.
      • unwrap

        public static ITextProcessor unwrap​(ITextProcessor processor)

        Unwraps a wrapped implementation of ITextProcessor.

        This method is meant for internal use only.

        Parameters:
        processor - the processor to be unwrapped.
        Returns:
        the unwrapped processor.
      • unwrap

        public static IPreProcessor unwrap​(IPreProcessor preProcessor)

        Unwraps a wrapped implementation of IPreProcessor.

        This method is meant for internal use only.

        Parameters:
        preProcessor - the pre-processor to be unwrapped.
        Returns:
        the unwrapped pre-processor.
      • unwrap

        public static IPostProcessor unwrap​(IPostProcessor postProcessor)

        Unwraps a wrapped implementation of IPostProcessor.

        This method is meant for internal use only.

        Parameters:
        postProcessor - the post-processor to be unwrapped.
        Returns:
        the unwrapped post-processor.