public class IllegalDirectiveException
extends java.lang.Exception
Constructor and Description |
---|
IllegalDirectiveException(java.util.List<java.lang.String> expectedTokens,
int lineno,
int charPos)
Constructs a new exception with a set of expected tokens.
|
IllegalDirectiveException(java.lang.String offendingToken,
java.util.List<java.lang.String> expectedTokens,
int lineno,
int charPos)
Constructs a new exception with an offending token.
|
IllegalDirectiveException(java.lang.String directive,
java.lang.String message)
Constructs a new exception with a specific detail message and clause.
|
IllegalDirectiveException(java.lang.String directive,
java.lang.String message,
int lineno)
Constructs a new exception with a specific detail message and line number.
|
IllegalDirectiveException(java.lang.String directive,
java.lang.String message,
int lineno,
int charPos)
Constructs a new exception with a specific detail message, line number and
char position.
|
Modifier and Type | Method and Description |
---|---|
int |
getCharPosition()
Get the character position where the directive error happened.
|
java.lang.String |
getDirective()
Get the illegal directive.
|
int |
getDirectiveLine()
Get the line of the code that contains the illegal directive.
|
java.util.List<java.lang.String> |
getExpectedTokens()
Get the list of expected token.
|
java.lang.String |
getMessage() |
java.lang.String |
getOffendingToken()
Get the offending token that triggered the Exception.
|
void |
setDirective(java.lang.String directive)
Set the illegal directive.
|
void |
setDirectiveLine(int lineno)
Set the line of the code that contains the illegal directive.
|
public IllegalDirectiveException(java.lang.String directive, java.lang.String message)
directive
- Illegal directivemessage
- Specific exception message.public IllegalDirectiveException(java.lang.String offendingToken, java.util.List<java.lang.String> expectedTokens, int lineno, int charPos)
offendingToken
- Token that break the parsing.expectedTokens
- Set of expected tokens.lineno
- Line number where the parsing error occurred.charPos
- Char position where the parsing error occurred.public IllegalDirectiveException(java.util.List<java.lang.String> expectedTokens, int lineno, int charPos)
expectedTokens
- Set of expected tokens.lineno
- Line number where the parsing error occurred.charPos
- Char position where the parsing error occurred.public IllegalDirectiveException(java.lang.String directive, java.lang.String message, int lineno)
directive
- Illegal directivemessage
- Specific exception message.lineno
- Line number where the parsing error occurred.public IllegalDirectiveException(java.lang.String directive, java.lang.String message, int lineno, int charPos)
directive
- Illegal directivemessage
- Specific exception message.lineno
- Line number where the parsing error occurred.charPos
- Char position where the parsing error occurred.public java.lang.String getDirective()
public void setDirective(java.lang.String directive)
directive
- The directive.public int getDirectiveLine()
public void setDirectiveLine(int lineno)
lineno
- Line number in the XcodeML that triggered the exception.public int getCharPosition()
public java.lang.String getOffendingToken()
public java.util.List<java.lang.String> getExpectedTokens()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable