|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.ext.misc.Split
public final class Split
A method model that implements the Perl 5 split function. This uses the Jakarta ORO library to perform the split.
Usage:
From java:
TemplateModelRoot root = new SimpleHash(); root.put( "split", new freemarker.ext.misc.Split() ); ...
From your FM-Classic template:
The following lists each directory in the path: <assign path = "/var/log/apache/"> <assign output = split( "/\\//", path )> <foreach item in output> %{item} </foreach> ...
Constructor Summary | |
---|---|
Split()
Create a new split method. |
Method Summary | |
---|---|
TemplateModel |
exec(java.util.List<TemplateModel> arguments)
Executes a method call. |
boolean |
isEmpty()
Is the object empty? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Split()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface TemplateModel
false
to indicate the method is not emptypublic TemplateModel exec(java.util.List<TemplateModel> arguments) throws TemplateModelException
List
of
TemplateModel
objects.
exec
in interface TemplateMethodModel2
arguments
- 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 |