|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.interpreter.type.AbstractCode
public abstract class AbstractCode
This is the abstract base class which can be used for all classes implementing the interface Code. It provides some useful definitions for most of the methods.
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
AbstractCode(CodeToken token)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
This method takes the first token and executes it. |
protected Localizer |
getLocalizer()
Getter for localizer. |
java.lang.String |
getName()
Getter for the name. |
CodeToken |
getToken()
Getter for token. |
boolean |
isIf()
This simple little method distinguishes the conditionals from the other primitives. |
boolean |
isOuter()
Getter for the outer flag. |
protected java.lang.Object |
readResolve()
Restore the internal state when the instance is loaded from file. |
java.lang.String |
toString()
|
java.lang.String |
toText()
Determine the printable representation of the control sequence or active character initially bound to the primitive. |
java.lang.String |
toText(Context context)
Determine the printable representation of the control sequence or active character initially bound to the primitive. |
| 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 AbstractCode(CodeToken token)
token - the initial token for the primitive| Method Detail |
|---|
public void execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
execute in interface Codeprefix - 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 typesetterCode.execute(
org.extex.interpreter.Flags, org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)protected Localizer getLocalizer()
public java.lang.String getName()
Code
getName in interface CodeCode.getName()public CodeToken getToken()
getToken in interface Codepublic boolean isIf()
Code
isIf in interface Codetrue iff this is some sort if \if.Code.isIf()public boolean isOuter()
Code
isOuter in interface Codetrue iff the code is defined outer.Code.isOuter()
protected java.lang.Object readResolve()
throws java.io.ObjectStreamException
java.io.ObjectStreamException - in case of an errorpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String toText()
If the token is not known then the empty string is returned.
public java.lang.String toText(Context context)
If the token is not known then the empty string is returned.
context - the processing context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||