APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.tools.javac.parser

public Class Tokens

extends Object
Class Inheritance
Imports
java.util.HashMap, .Locale, .Map, java.util.function.Predicate, com.sun.tools.javac.api.Formattable, .Messages, com.sun.tools.javac.parser.Tokens.Token.Tag, com.sun.tools.javac.util.*

A class that defines codes/utilities for Java source tokens returned from lexical analysis.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
pack-priv static class
pack-priv static class
pack-priv static class
public static class
Tokens.Token

This is the class representing a javac token.

public static enum
Tokens.TokenKind

This enum defines all tokens used by the javac scanner.

Field Summary

Modifier and TypeField and Description
public static final Tokens.Token
private Map<String, Tokens.TokenKind>
keywords

Keyword array.

private final Names
public static final Context.Key<Tokens>

Constructor Summary

AccessConstructor and Description
protected
Tokens(Context context)

Method Summary

Modifier and TypeMethod and Description
public static Tokens
instance(Context context)

pack-priv Tokens.TokenKind
lookupKind(Name name)

Create a new token given a name; if the name corresponds to a token name, a new token of the corresponding kind is returned; otherwise, an identifier token is returned.

pack-priv Tokens.TokenKind
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait