public final class FactoryLoader extends Object
ClearsilverFactory
into the classes that
need to create HDF
and CS
instances.
For now, projects should set the ClearsilverFactory
in FactoryLoader
and use the singleton accessor getClearsilverFactory()
if proper
dependency injection is not easy to implement.
Allows the default implementation to be the original JNI version without
requiring users that don't want to use the JNI version to have to link
it in. The ClearsilverFactory object to use can be either passed into the
setClearsilverFactory(org.clearsilver.ClearsilverFactory)
method or the class name can be specified
in the Java property org.clearsilver.defaultClearsilverFactory
.
Constructor and Description |
---|
FactoryLoader() |
Modifier and Type | Method and Description |
---|---|
static ClearsilverFactory |
getClearsilverFactory()
Get the
ClearsilverFactory object to be used by
disparate parts of the application. |
static ClearsilverFactory |
setClearsilverFactory(ClearsilverFactory clearsilverFactory)
Set the
ClearsilverFactory to be used by
the application. |
public static ClearsilverFactory getClearsilverFactory()
ClearsilverFactory
object to be used by
disparate parts of the application.public static ClearsilverFactory setClearsilverFactory(ClearsilverFactory clearsilverFactory)
ClearsilverFactory
to be used by
the application. If parameter is null
, then the default factory
implementation will be used the next time getClearsilverFactory()
is called.null
)Copyright © 2010-2012 Google. All Rights Reserved.