Class JStachioFactory

java.lang.Object
io.jstach.jstachio.spi.JStachioFactory

public final class JStachioFactory extends Object
Creates JStachios mainly with the ServiceLoader or a JStachioFactory.Builder.
Author:
agentgt
See Also:
  • Method Details

    • defaultJStachio

      public static JStachio defaultJStachio()
      Provides a singleton JStachio resolved by the ServiceLoader.

      Because of differences to how the ServiceLoader works with modular applications registration of generated templates is different. For modular applications you can either allow reflective access to JStachio:

      
       // module-info.java
       opens packagewith.jstachemodels to io.jstach.jstachio;
        
      Or you can generate a catalog of all templates and register them. See JStacheCatalog for details.
      Returns:
      service loader based jstachio.
    • builder

      A mutable builder to create JStachio from JStachioExtensions. Once JStachioFactory.Builder.build() is called the returned JStachio will be immutable. If no extensions are added the returned JStachio will be resolved in a simlar manner to the default JStachio.
      Returns:
      empty builder