java.lang.Object
io.jstach.jstachio.spi.JStachioFactory
Creates JStachios mainly with the
ServiceLoader
or a JStachioFactory.Builder
.- Author:
- agentgt
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder for creating a custom JStachio. -
Method Summary
Modifier and TypeMethodDescriptionstatic JStachioFactory.Builder
builder()
A mutable builder to createJStachio
fromJStachioExtension
s.static JStachio
Provides a singleton JStachio resolved by theServiceLoader
.
-
Method Details
-
defaultJStachio
Provides a singleton JStachio resolved by theServiceLoader
.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:
Or you can generate a catalog of all templates and register them. See// module-info.java opens packagewith.jstachemodels to io.jstach.jstachio;
JStacheCatalog
for details.- Returns:
- service loader based jstachio.
-
builder
A mutable builder to createJStachio
fromJStachioExtension
s. OnceJStachioFactory.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 thedefault JStachio
.- Returns:
- empty builder
-