## org.extex.interpreter.type Interface Code

All Known Implementing Classes:

public interface Code

This is the interface for all expandable or executable classes.

Each primitive has a name which is used for debugging purposes. Since an arbitrary sequence of \let and \def operations might have taken place it is in general not possible to determine the current name under which the primitive has been called. Thus an initial value is stored in it for this purpose.

Version:
$Revision: 6448$
Author:
Gerd Neugebauer, Michael Niedermair

Method Summary
 void execute(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
This method takes the first token and executes it.
 java.lang.String getName()
 CodeToken getToken()
Getter for the token.
 boolean isIf()
This simple little method distinguishes the conditionals from the other primitives.
 boolean isOuter()
Getter for the outer flag.

Method Detail

### isIf

boolean isIf()
This simple little method distinguishes the conditionals from the other primitives. This is necessary for the processing of all \if* primitives.

Returns:
true iff this is some sort if \if.

### isOuter

boolean isOuter()
Getter for the outer flag.

Returns:
true iff the code is defined outer.

### getName

java.lang.String getName()

Getter for the name.

Returns:
the name

### getToken

CodeToken getToken()
Getter for the token.

Returns:
the token

### execute

void execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
This method takes the first token and executes it. The result is placed on the stack. This operation might have side effects. To execute a token it might be necessary to consume further tokens.

Parameters:
prefix - the prefix controlling the execution
context - the interpreter context
source - the token source
typesetter - the typesetter
Throws:
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
ConfigurationException - in case of an configuration error