Top Description Fields Constructors Methods
tech.units.indriya.format

public Class TokenMgrError

extends MeasurementError
Class Inheritance
Imports
javax.measure.MeasurementError

Token Manager Error.
Author
Werner Keil
Version
2.0

Field Summary

Modifier and TypeField and Description
public static final int
INVALID_LEXICAL_STATE

Tried to change to an invalid lexical state.

public static final int
LEXICAL_ERROR

Lexical error occurred.

public static final int
LOOP_DETECTED

Detected (and bailed out of) an infinite loop in the token manager.

private static final long
serialVersionUID

Hides javax.measure.MeasurementError.serialVersionUID.

The Serialization identifier for this class.
public static final int
STATIC_LEXER_ERROR

An attempt was made to create a second instance of a static token manager.

Constructor Summary

AccessConstructor and Description
public
TokenMgrError()

No arg constructor.

public
TokenMgrError(String message)

Constructor with message.

public
TokenMgrError(String message, int reason)

Constructor with message and reason.

public
TokenMgrError(boolean EOFSeen, int errorLine, int errorColumn, String errorAfter, char curChar, int reason)

Full Constructor.

Method Summary

Modifier and TypeMethod and Description
protected static String
addEscapes(String str)

Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string

protected static String
lexicalError(boolean EOFSeen, int errorLine, int errorColumn, String errorAfter, char curChar)

Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.

Field Detail

INVALID_LEXICAL_STATEback to summary
public static final int INVALID_LEXICAL_STATE

Tried to change to an invalid lexical state.

LEXICAL_ERRORback to summary
public static final int LEXICAL_ERROR

Lexical error occurred.

LOOP_DETECTEDback to summary
public static final int LOOP_DETECTED

Detected (and bailed out of) an infinite loop in the token manager.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.measure.MeasurementError.serialVersionUID.

The Serialization identifier for this class. Increment only if the serialized form of the class changes.

STATIC_LEXER_ERRORback to summary
public static final int STATIC_LEXER_ERROR

An attempt was made to create a second instance of a static token manager.

Constructor Detail

TokenMgrErrorback to summary
public TokenMgrError()

No arg constructor.

TokenMgrErrorback to summary
public TokenMgrError(String message)

Constructor with message.

TokenMgrErrorback to summary
public TokenMgrError(String message, int reason)

Constructor with message and reason.

TokenMgrErrorback to summary
public TokenMgrError(boolean EOFSeen, int errorLine, int errorColumn, String errorAfter, char curChar, int reason)

Full Constructor.

Method Detail

addEscapesback to summary
protected static String addEscapes(String str)

Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string

lexicalErrorback to summary
protected static String lexicalError(boolean EOFSeen, int errorLine, int errorColumn, String errorAfter, char curChar)

Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error. Parameters : EOFSeen : indicates if EOF caused the lexical error curLexState : lexical state in which this error occurred errorLine : line number when the error occurred errorColumn : column number when the error occurred errorAfter : prefix that was seen before this error occurred curchar : the offending character Note: You can customize the lexical error message by modifying this method.