|
terp - the Codemesh Modular Template Interpreter v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemesh.terp.api.Executor.AbstractExecutor<Rvalue>
com.codemesh.terp.eval.executors.IsFileTypeExecutor
public class IsFileTypeExecutor
An executor that returns true if a file is of a certain type.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.codemesh.terp.api.Selector |
|---|
Selector.AbstractSelector<T> |
| Nested classes/interfaces inherited from interface com.codemesh.terp.api.Executor |
|---|
Executor.AbstractExecutor<T>, Executor.ForMethod |
| Field Summary | |
|---|---|
static int |
DIRECTORY
|
static int |
EXEC
|
static int |
FILE
|
static int |
HIDDEN
|
static int |
JAR
|
static int |
READ
|
static int |
WRITE
|
static int |
ZIP
|
| Fields inherited from interface com.codemesh.terp.api.Selector |
|---|
NO_ARGS, NO_PARAM_NAMES |
| Constructor Summary | |
|---|---|
IsFileTypeExecutor(int type)
|
|
| Method Summary | |
|---|---|
Rvalue |
execute(java.util.List<java.lang.Object> args,
TerpEvaluator eval,
TerpContext ctx)
Performs the executor's action on the given arguments in the given context. |
java.lang.String |
getItemName()
Returns the name used for the item that is being tested. |
java.lang.String[] |
getParamNames()
Returns the parameter names. |
boolean |
matches(java.util.List<java.lang.Object> args)
Returns true if the executor applies to the given arguments. |
boolean |
selects(java.io.File file,
java.lang.Object owner)
Returns true if the given item satisfies the selector's criteria. |
boolean |
selects(java.io.File file,
java.lang.Object owner,
java.util.List<java.lang.Object> args)
Returns true if the given item satisfies the selector's criteria. |
| Methods inherited from class com.codemesh.terp.api.Executor.AbstractExecutor |
|---|
execute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FILE
public static final int DIRECTORY
public static final int READ
public static final int WRITE
public static final int HIDDEN
public static final int EXEC
public static final int ZIP
public static final int JAR
| Constructor Detail |
|---|
public IsFileTypeExecutor(int type)
| Method Detail |
|---|
public boolean matches(java.util.List<java.lang.Object> args)
Executor
matches in interface Executor<Rvalue>args - the arguments passed to the executor.
public java.lang.String getItemName()
Selector
getItemName in interface Selector<java.io.File>public java.lang.String[] getParamNames()
Selector
getParamNames in interface Selector<java.io.File>
public boolean selects(java.io.File file,
java.lang.Object owner)
Selector
selects in interface Selector<java.io.File>file - the item to test.owner - the item's owner, i.e. the object from which items are being selected.
public boolean selects(java.io.File file,
java.lang.Object owner,
java.util.List<java.lang.Object> args)
Selector
selects in interface Selector<java.io.File>file - the item to test.owner - the item's owner, i.e. the object from which items are being selected.args - the arguments to be taken into account in the test. @return true if selection criteria are met.
public Rvalue execute(java.util.List<java.lang.Object> args,
TerpEvaluator eval,
TerpContext ctx)
Executor
execute in interface Executor<Rvalue>args - the arguments.eval - the evaluator to use. Can frequently be null.ctx - the context in which the execution occurs. Can frequently be null.
|
terp - the Codemesh Modular Template Interpreter v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||