|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.interpreter.type.AbstractCode
org.extex.unit.tex.macro.util.MacroCode
public class MacroCode
This class provides an implementation for any macro code bound to a control
sequence or active character.
TODO missing documentation
The Macro Code
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
MacroCode(CodeToken token,
Flags flags,
boolean notLong,
MacroPattern pattern,
Tokens body)
Creates a new object. |
|
| Method Summary | |
|---|---|
boolean |
compare(Token token,
Context context)
Compare the code with some other code. |
void |
enableLogging(java.util.logging.Logger logger)
Setter for the logger. |
void |
execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
This method takes the first token and executes it. |
void |
expand(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
This method takes the first token and expands it. |
protected Localizer |
getLocalizer()
Getter for localizer. |
boolean |
isOuter()
Getter for the outer flag. |
Tokens |
show(Context context)
This method is the getter for the description of the primitive. |
| Methods inherited from class org.extex.interpreter.type.AbstractCode |
|---|
getName, getToken, isIf, readResolve, toString, toText, toText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final long serialVersionUID
| Constructor Detail |
|---|
public MacroCode(CodeToken token,
Flags flags,
boolean notLong,
MacroPattern pattern,
Tokens body)
token - the initial token for the macroflags - the flags controlling the behavior of the macronotLong - inverted indicator for the long macrospattern - the pattern for the acquiring of the arguments. The value
of null means that no arguments are expectedbody - the expansion text| Method Detail |
|---|
public boolean compare(Token token,
Context context)
throws HelpingException
compare in interface ComparableCodetoken - the token to compare tocontext - the interpreter context
true iff the code is equivalent according to the
semantics of \ifx
HelpingException - in case of an errorComparableCode.compare(
org.extex.scanner.type.token.Token,
org.extex.interpreter.context.Context)public void enableLogging(java.util.logging.Logger logger)
enableLogging in interface LogEnabledlogger - the logger to useLogEnabled.enableLogging(
java.util.logging.Logger)
public void execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
execute in interface Codeexecute in class AbstractCodeprefix - the prefix controlling the executioncontext - the interpreter contextsource - the token sourcetypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterAbstractCode.execute(
org.extex.interpreter.Flags, org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)
public void expand(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
expand in interface ExpandableCodeprefix - the prefix flags controlling the expansioncontext - the interpreter contextsource - the token sourcetypesetter - the typesetter
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetterExpandableCode.expand(
org.extex.interpreter.Flags, org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)protected Localizer getLocalizer()
getLocalizer in class AbstractCodeAbstractCode.getLocalizer()public boolean isOuter()
isOuter in interface CodeisOuter in class AbstractCodetrue iff the code is defined outer.Code.isOuter()
public Tokens show(Context context)
throws HelpingException
show in interface Showablecontext - the interpreter context
HelpingException - in case of an errorShowable.show(
org.extex.interpreter.context.Context)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||