Package net.sf.xslthl

Class Config


  • public class Config
    extends java.lang.Object
    Contains the Xslthl configuration
    • Field Detail

      • CONFIG_PROPERTY

        public static final java.lang.String CONFIG_PROPERTY
        System property that defines the path to the configuration file
        See Also:
        Constant Field Values
      • VERBOSE_LOADING_PROPERTY

        @Deprecated
        public static final java.lang.String VERBOSE_LOADING_PROPERTY
        Deprecated.
        since 2.1 XSLTHL uses the Java logging facility
        If set to true be verbose during loading of the configuration
        See Also:
        Constant Field Values
      • LOGLEVEL_PROPERTY

        public static final java.lang.String LOGLEVEL_PROPERTY
        The log level for the xslthl logger
        Since:
        2.1
        See Also:
        Constant Field Values
      • NO_EXTERNAL_PROPERTY

        public static final java.lang.String NO_EXTERNAL_PROPERTY
        Property set to disable external configuration loading
        See Also:
        Constant Field Values
      • highlighterClasses

        public static final java.util.Map<java.lang.String,​java.lang.Class<? extends Highlighter>> highlighterClasses
        Registered highlighter classes
      • PLUGIN_PREFIX

        public static final java.lang.String PLUGIN_PREFIX
        Prefix used for plug-able highlighters
        Since:
        2.1
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static Config getInstance()
        Get the default config
        Returns:
      • getInstance

        public static Config getInstance​(java.lang.String filename)
        Get the config from a given file
        Parameters:
        filename -
        Returns:
      • getPrefix

        public java.lang.String getPrefix()
        Returns:
        the prefix
      • getUri

        public java.lang.String getUri()
        Returns:
        the uri
      • getMainHighlighter

        public MainHighlighter getMainHighlighter​(java.lang.String id)
        Get the highlighter for a given language id, URI or filename.
        Parameters:
        id -
        Returns:
        A highlighter, or null if no highlighter exists