|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.capml.quasi.QuasiContent
Untamed: Represents a quasi-literal list of dom Nodes.
We define "Content" to be either a concrete Node, or a ConstList of concrete Nodes. The latter we also define as a "ContentList". As a ValueMaker, a QuasiContent will evaluate to a ContentList. As a MatchMaker, it will match against Content, and either succeed, extracting values, or fail. The Minimal-XML quasi-parser produces a QuasiContent.
Field Summary | |
(package private) static long |
serialVersionUID
Deprecated. |
Fields inherited from interface org.erights.e.elib.serial.Persistent |
HONORARY, HONORED_NAMES |
Fields inherited from interface org.erights.e.elib.tables.Selfless |
HONORARY, HONORED_NAMES |
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction |
HONORARY, HONORED_NAMES |
Constructor Summary | |
QuasiContent()
Deprecated. Enabled: |
Method Summary | |
void |
__printOn(TextWriter out)
Deprecated. Enabled: Prints as "sml`...`", where pretty printed quasi-XML appears between the backquotes |
(package private) static void |
bind(FlexList bindings,
int index,
Object value)
Deprecated. A convenience for placing @-hole matches into bindings. |
ConstList |
matchBind(ConstList args,
Object specimen)
Deprecated. Enabled: As a MatchMaker, while using the args to fill in the $-holes, pattern match against the specimen, which must be Content or String, and return the list of values extracted by @-holes. |
abstract boolean |
matchBind(ConstList args,
Object specimen,
FlexList bindings)
Deprecated. Enabled: As a MatchMaker, while using the args to fill in the $-holes, pattern match against the specimen, which must be Content, and put the values ( extracted by the @-holes into 'bindings'. |
(package private) static Node |
optTheOne(Object content)
Deprecated. If content represents a single Node, return it. |
abstract void |
prettyPrintOn(TextWriter out)
Deprecated. Enabled: Prints pretty printed quasi-XML |
abstract Object |
substitute(Object[] args)
Deprecated. Enabled: As a ValueMaker, given a list of args, use each arg to fill in the corresponding $-hole, and return the resulting concrete Content -- either a Node or a ConstList of Nodes. |
(package private) static Object |
toContent(Object content)
Deprecated. Coerce 'content', which must be Content (as defined in the class comment) or a String into a Content (as also defined there). |
(package private) static ConstList |
toContentList(Object content)
Deprecated. Coerce 'content', which must be Content (as defined in the class comment) or a String into a ContentList (as also defined there). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.erights.e.elib.tables.Selfless |
getSpreadUncall |
Field Detail |
static final long serialVersionUID
Constructor Detail |
public QuasiContent()
Method Detail |
static ConstList toContentList(Object content)
If 'content' is a Node, a singleton list containing that Node is returned. If it's a String, a singleton list of a Text on that String is returned. Otherwise, content must be a ConstList of Nodes, and is returned.
static Node optTheOne(Object content)
static Object toContent(Object content)
If 'content' is a Node, it's returned. If it's a String, a Text on that String is returned. Otherwise, it must be a ConstList of Nodes. If it's a singleton list, it's one member is returned. Otherwise the list is returned.
static void bind(FlexList bindings, int index, Object value)
public abstract Object substitute(Object[] args)
The args and return value must be concrete (not quasi). If it's filling in an Element tagName, the arg must be a String. Otherwise it may be either a String or Content.
public ConstList matchBind(ConstList args, Object specimen)
If the match fails, return null. The args, specimen, and return value must be concrete. The args must follow the same rules as the args to substitute(). The specimen may be either Content or String. The returned list of values extracted by
matchBind
in interface MatchMaker
public abstract boolean matchBind(ConstList args, Object specimen, FlexList bindings)
Returns whether the match succeeded. The args, specimen, and the values put into bindings must be concrete. The args must follow the same rules as the args to substitute(). The specimen may be either Content or String. The values extracted by @-holes are Strings, if they were extracted by a tagName @-hole, or a Content, if they were extracted by an @-hole in content position.
matchBind
in interface MatchMaker
public void __printOn(TextWriter out) throws IOException
IOException
public abstract void prettyPrintOn(TextWriter out) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |