|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Template
XXX THIS DOES NOT CONFORM TO THE IMPLEMENTATION IN PROGRESS.
Field Summary | |
---|---|
static int |
TPL_APPLY
A Template application, a data structure consisting of (1) a reference to the Template being applied and (2) a list of name-value pairs. |
static int |
TPL_ATTR
The Template consists of two Strings, the first of which should resolve in the Context to an object and the second of which is the name of a field in the class of which the object is an instance. |
static int |
TPL_BINARY
The Template is an irreducible byte array. |
static int |
TPL_BY_NAME
The Template is a String which should resolve to a Template in the Context. |
static int |
TPL_IF
A conditional Template consisting of a String value test
and a reference to a Template. |
static int |
TPL_IF_ELSE
A conditional Template consisting of a String value test
and references to two Templates. |
static int |
TPL_MAP
A Template mapping consisting of (1) a name referring to one or more values and (2) a reference to a Template. |
static int |
TPL_REF
The Template contains a reference to a Template. |
static int |
TPL_SEQ
A Template consisting of a number of Templates. |
static int |
TPL_STRING
The Template is an irreducible String. |
static int |
TPL_VAR
The Template is a String which should be looked up in the Context but is otherwise irreducible. |
Method Summary | |
---|---|
byte[] |
getBytes(Context ctx)
Recursively reduce all constituent Templates in the Context to byte arrays, concatenate them, and return the result. |
int |
getType()
|
java.lang.String |
toString(Context ctx)
Recursively reduce all constituent Templates in the Context to Strings, concatenate them, and return the result. |
Field Detail |
---|
static final int TPL_BINARY
static final int TPL_STRING
static final int TPL_VAR
static final int TPL_ATTR
static final int TPL_REF
static final int TPL_BY_NAME
static final int TPL_MAP
static final int TPL_APPLY
static final int TPL_IF
test
and a reference to a Template. If test
resolves to
true
in the Context, the Template is resolved in the
Context. If test
is undefined or is defined but does
not resolve to true
the Template is ignored.
static final int TPL_IF_ELSE
test
and references to two Templates. If test
resolves to
true
in the Context, the first Template is resolved in
the Context. Otherwise the second Template is resolved.
static final int TPL_SEQ
Method Detail |
---|
int getType()
java.lang.String toString(Context ctx)
byte[] getBytes(Context ctx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |