|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dante.extex.interpreter.type.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(java.lang.String codeName)
Creates a new object. |
Method Summary | |
void |
enableLocalization(Localizer theLocalizer)
Setter for the localizer. |
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. |
boolean |
isIf()
This simple little method distinguishes the conditionals from the other primitives. |
boolean |
isOuter()
Getter for the outer flag. |
static java.lang.String |
printable(Context context,
Token token)
Return the printable version of a token for error messages. |
protected java.lang.String |
printableControlSequence(Context context)
Attach the current escape character in front of the name and return the result. |
protected java.lang.Object |
readResolve()
Restore the internal state when the instance is loaded from file. |
void |
setName(java.lang.String theName)
Setter for the name of this primitive. |
java.lang.String |
toString()
|
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(java.lang.String codeName)
codeName
- the name of the primitiveMethod Detail |
public static java.lang.String printable(Context context, Token token)
context
- the processing contexttoken
- the token to get a printable representation for
public void enableLocalization(Localizer theLocalizer)
enableLocalization
in interface Localizable
theLocalizer
- the new value for the localizerLocalizable.enableLocalization(
de.dante.util.framework.i18n.Localizer)
public void execute(Flags prefix, Context context, TokenSource source, Typesetter typesetter) throws InterpreterException
Code
execute
in interface Code
prefix
- the prefix controlling the executioncontext
- the interpreter contextsource
- the token sourcetypesetter
- the typesetter
InterpreterException
- in case of an errorCode.execute(
de.dante.extex.interpreter.Flags,
de.dante.extex.interpreter.context.Context,
de.dante.extex.interpreter.TokenSource,
de.dante.extex.typesetter.Typesetter)
protected Localizer getLocalizer()
public java.lang.String getName()
Code
getName
in interface Code
Code.getName()
public boolean isIf()
Code
isIf
in interface Code
true
iff this is some sort if \if.Code.isIf()
public boolean isOuter()
Code
isOuter
in interface Code
true
iff the code is defined outer.Code.isOuter()
protected java.lang.String printableControlSequence(Context context)
This method is meant to produce a printable version of the control sequence for error messages.
context
- the processing context
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
- in case of an errorpublic void setName(java.lang.String theName)
Code
setName
in interface Code
theName
- the nameCode.setName(java.lang.String)
public java.lang.String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |