|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.misc.Join
public final class Join
Replicates the standard Perl join function. Partners with the Split method model. Any sublists are joined along with the main list in a depth-first traversal order.
Usage:
From java:
TemplateModelRoot root = new SimpleHash(); root.put( "join", freemarker.ext.misc.Join.getInstance() ); ...
From your FM-Classic template:
The following creates a directory path:
<assign path = [ "var", "log", "apache" ]>
<assign output = join( "/", path )>
/${output}
...
| Method Summary | |
|---|---|
TemplateModel |
exec(java.util.List<TemplateModel> arguments)
Executes a method call. |
static Join |
getInstance()
Retrieve a singleton instance of this class. |
boolean |
isEmpty()
Is the object empty? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Join getInstance()
Join class
public boolean isEmpty()
throws TemplateModelException
TemplateModel
isEmpty in interface TemplateModeltrue if this object is empty, otherwise false
TemplateModelException
public TemplateModel exec(java.util.List<TemplateModel> arguments)
throws TemplateModelException
TemplateMethodModel2List of
TemplateModel objects.
exec in interface TemplateMethodModel2arguments - a List of TemplateModel objects
containing the values of the arguments passed to the method.
TemplateModel produced by the method, or null.
TemplateModelException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||