Top Description Fields Constructors Methods
uk.ac.ed.ph.snuggletex

public final Class SessionConfiguration

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
uk.ac.ed.ph.snuggletex.internal.util.ObjectUtilities

Specifies options for how a SnuggleSession should parse and process SnuggleInputs.
Author
David McKain
Version
$Revision:179 $

Field Summary

Modifier and TypeField and Description
public static final int
private int
expansionLimit

Maximum depth when expanding out user-defined commands and environments.

private boolean
failingFast

Set to true to fail immediately on error.

private NumberMatcher
numberMatcher

Matcher used to identify numbers in math mode input.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

public int
getExpansionLimit()

Gets the maximum depth when expanding out user-defined commands and environments.

public NumberMatcher
getNumberMatcher()

Gets the NumberMatcher used to identify numbers in Math mode input.

public boolean

Returns:

true to fail immediately, false to keep going
isFailingFast
()

Returns whether or not the SnuggleSession will fail immediately on error, or keep going.

public void
setExpansionLimit(int expansionLimit)

Sets the maximum depth when expanding out user-defined commands and environments.

public void
setFailingFast(boolean
true to fail immediately, false to keep going
failingFast
)

Sets whether or not the SnuggleSession will fail immediately on error, or keep going.

public void
setNumberMatcher(NumberMatcher numberMatcher)

Sets the NumberMatcher used to identify numbers in Math mode input.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

DEFAULT_EXPANSION_LIMITback to summary
public static final int DEFAULT_EXPANSION_LIMIT
expansionLimitback to summary
private int expansionLimit

Maximum depth when expanding out user-defined commands and environments. This prevents possible infinite recursion issues, which are hard to detect due to the highly dynamic nature of LaTeX input.

The default value is DEFAULT_EXPANSION_LIMIT. Set this to 0 or less to disable this safeguard (and risk possible consequences, such as the stack or heap being eaten up).

Evaluating a user-defined command body, or the begin/end clause of an environment increases the current depth by 1.

failingFastback to summary
private boolean failingFast

Set to true to fail immediately on error. Default is to record error but keep going

numberMatcherback to summary
private NumberMatcher numberMatcher

Matcher used to identify numbers in math mode input.

Constructor Detail

SessionConfigurationback to summary
public SessionConfiguration()

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Annotations
@Override
getExpansionLimitback to summary
public int getExpansionLimit()

Gets the maximum depth when expanding out user-defined commands and environments. This prevents possible infinite recursion issues, which are hard to detect due to the highly dynamic nature of LaTeX input.

The default value is DEFAULT_EXPANSION_LIMIT. Set this to 0 or less to disable this safeguard (and risk possible consequences, such as the stack or heap being eaten up).

Evaluating a user-defined command body, or the begin/end clause of an environment increases the current depth by 1.

getNumberMatcherback to summary
public NumberMatcher getNumberMatcher()

Gets the NumberMatcher used to identify numbers in Math mode input. Returns null if a default SimpleNumberMatcher is being used.

Since
1.3.0
isFailingFastback to summary
public boolean isFailingFast()

Returns whether or not the SnuggleSession will fail immediately on error, or keep going.

Returns:boolean

true to fail immediately, false to keep going

setExpansionLimitback to summary
public void setExpansionLimit(int expansionLimit)

Sets the maximum depth when expanding out user-defined commands and environments. This prevents possible infinite recursion issues, which are hard to detect due to the highly dynamic nature of LaTeX input.

The default value is DEFAULT_EXPANSION_LIMIT. Set this to 0 or less to disable this safeguard (and risk possible consequences, such as the stack or heap being eaten up).

Evaluating a user-defined command body, or the begin/end clause of an environment increases the current depth by 1.

setFailingFastback to summary
public void setFailingFast(boolean failingFast)

Sets whether or not the SnuggleSession will fail immediately on error, or keep going.

Parameters
failingFast:boolean

true to fail immediately, false to keep going

setNumberMatcherback to summary
public void setNumberMatcher(NumberMatcher numberMatcher)

Sets the NumberMatcher used to identify numbers in Math mode input.

This may be null, which results in a default SimpleNumberMatcher being used.

Since
1.3.0
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override