Enum NullTemplateCache

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      INSTANCE
      Shared instance of null cache.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Remove all mappings from the cache.
      void evict​(TemplateSource source)
      Evict the mapping for this source from this cache if it is present.
      Template get​(TemplateSource source, Parser parser)
      Return the value to which this cache maps the specified key.
      NullTemplateCache setReload​(boolean reload)
      Turn on/off auto reloading of templates.
      static NullTemplateCache valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static NullTemplateCache[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • INSTANCE

        public static final NullTemplateCache INSTANCE
        Shared instance of null cache.
    • Method Detail

      • values

        public static NullTemplateCache[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NullTemplateCache c : NullTemplateCache.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NullTemplateCache valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • clear

        public void clear()
        Description copied from interface: TemplateCache
        Remove all mappings from the cache.
        Specified by:
        clear in interface TemplateCache
      • evict

        public void evict​(TemplateSource source)
        Description copied from interface: TemplateCache
        Evict the mapping for this source from this cache if it is present.
        Specified by:
        evict in interface TemplateCache
        Parameters:
        source - the source whose mapping is to be removed from the cache
      • get

        public Template get​(TemplateSource source,
                            Parser parser)
                     throws java.io.IOException
        Description copied from interface: TemplateCache
        Return the value to which this cache maps the specified key.
        Specified by:
        get in interface TemplateCache
        Parameters:
        source - source whose associated template is to be returned.
        parser - The Handlebars parser.
        Returns:
        A template.
        Throws:
        java.io.IOException - If input can't be parsed.