|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.CompileableFactoryParameters
public final class CompileableFactoryParameters
Parameter class for a Compileable factory. This is a convenience class for passing parameters to a compileable factory to create new instances of compileable objects. Any additional parameters can be added to this parameter class without having to alter the method signature of the processor itself.
This is an immutable class. Calls to any of the withXXX()
methods return a new object.
Method Summary | |
---|---|
Cache |
getCache()
Get the cache object for this parameter object. |
java.lang.String |
getEncoding()
Get the character encoding for this parameter object. |
java.io.InputStream |
getStream()
Get the input stream for this parameter object. |
static CompileableFactoryParameters |
newInstance(java.io.InputStream stream)
Create a new instance of this compileable factory parameter class with the given input stream. |
static CompileableFactoryParameters |
newInstance(java.io.InputStream stream,
Cache cache)
Create a new instance of this compileable factory parameter class with the given input stream and cache to be associated with. |
CompileableFactoryParameters |
withCache(Cache cache)
Return a new CompileableFactoryParameters object with the given cache in place of the existing cache. |
CompileableFactoryParameters |
withEncoding(java.lang.String encoding)
Return a new CompileableFactoryParameters object with the given character encoding in place of the existing character encoding. |
CompileableFactoryParameters |
withInputStream(java.io.InputStream stream)
Return a new CompileableFactoryParameters object with the given input stream in place of the existing input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CompileableFactoryParameters newInstance(java.io.InputStream stream)
stream
- the input stream to be passed in to the compileable factory
java.lang.NullPointerException
- the input stream is null
public static CompileableFactoryParameters newInstance(java.io.InputStream stream, Cache cache)
stream
- the input stream to be passed in to the compileable factorycache
- the cache the resulting compiled object will be associated
with
java.lang.NullPointerException
- the writer is null
public CompileableFactoryParameters withEncoding(java.lang.String encoding)
encoding
- the character encoding for the compileable factory
to use in place of the existing character encoding
public CompileableFactoryParameters withCache(Cache cache)
cache
- the cache for the compileable factory to use in place of
the existing cache
public CompileableFactoryParameters withInputStream(java.io.InputStream stream)
stream
- the input stream for the compileable factory to use
in place of the existing input stream
java.lang.NullPointerException
- the input stream is null
public java.io.InputStream getStream()
public java.lang.String getEncoding()
public Cache getCache()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |