KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > rules > IToken


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.text.rules;
12
13
14 /**
15  * A token to be returned by a rule.
16  */

17 public interface IToken {
18
19     /**
20      * Return whether this token is undefined.
21      *
22      * @return <code>true</code>if this token is undefined
23      */

24     boolean isUndefined();
25
26     /**
27      * Return whether this token represents a whitespace.
28      *
29      * @return <code>true</code>if this token represents a whitespace
30      */

31     boolean isWhitespace();
32
33     /**
34      * Return whether this token represents End Of File.
35      *
36      * @return <code>true</code>if this token represents EOF
37      */

38     boolean isEOF();
39
40     /**
41      * Return whether this token is neither undefined, nor whitespace, nor EOF.
42      *
43      * @return <code>true</code>if this token is not undefined, not a whitespace, and not EOF
44      */

45     boolean isOther();
46
47     /**
48      * Return a data attached to this token. The semantics of this data kept undefined by this interface.
49      *
50      * @return the data attached to this token.
51      */

52     Object JavaDoc getData();
53 }
54
Popular Tags