|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Producer of token sequence.
This provides abstraction of token sequence producer. You can separate implementation of token sequence generation from token providing mechanism.
ATTENTION:
Implementation class should be "Serializable" because it may be stored for later use.
Inner Class Summary | |
static interface |
Producer.Factory
Factory interface to create " Producer ". |
Method Summary | |
void |
produce(ConsumerContext context,
Consumer consumer)
Produce token sequence. |
void |
resolve(SymbolSet symbolSet)
Resolve symbol of containing tokens. |
Method Detail |
public void produce(ConsumerContext context, Consumer consumer) throws java.io.IOException
Produce token sequence, and provide it to specified consumer.
For Consumer re-use,
implementation classes should
invoke Consumer.flush(ConsumerContext)
at the end of successfully token sequence consuming.
Otherwise(e.g.: exception raising),
implementation should invoke Consumer.clear()
.
For performance efficiency, only one of those should be invoked.
context
- context processing depends onconsumer
- consumer to provide token sequence tojava.io.IOException
- if
MixingIOException
is caughtpublic void resolve(SymbolSet symbolSet)
Symbol
of name may not be unified in some situations
(e.g.: after objec deserialization).
It causes comparation mistakes,
because one of Symbol
implementations uses
pointer comparation to examine string equalitiy.
This method gives tokens the chance to unify
Symbol
by resolving with specified
SymbolSet
(= invoking SymbolSet.lookup(Symbol)
)
symbolSet
- set to resolve with
|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |