KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > groovy > syntax > TokenMismatchException


1 package org.codehaus.groovy.syntax;
2
3 public class TokenMismatchException extends TokenException {
4     private Token unexpectedToken;
5     private int expectedType;
6
7     public TokenMismatchException(Token token, int expectedType) {
8         super("Expected token: " + expectedType + " but found: " + token, token);
9         this.unexpectedToken = token;
10         this.expectedType = expectedType;
11     }
12
13     public Token getUnexpectedToken() {
14         return this.unexpectedToken;
15     }
16
17     public int getExpectedType() {
18         return this.expectedType;
19     }
20 }
21
Popular Tags