Package org.openjdk.asmtools.jcoder
Class JcodTokens
- java.lang.Object
-
- org.openjdk.asmtools.jcoder.JcodTokens
-
public class JcodTokens extends java.lang.Object
JcodTokens This class contains tokens specific to parsing JCOD syntax. The classes in JcodTokens are following a Singleton Pattern. These classes are Enums, and they are contained in private hash maps (lookup tables and reverse lookup tables). These hash maps all have public accessors, which clients use to look-up enums. Tokens in this table carry no external state, and are typically treated as constants. They do not need to be reset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JcodTokens.ConstType
ConstType A (typed) tag (constant) representing the type of Constant in the Constant Pool.static class
JcodTokens.KeywordType
static class
JcodTokens.Token
Scanner Tokens (Definitive List)static class
JcodTokens.TokenType
-
Field Summary
Fields Modifier and Type Field Description private static java.util.HashMap<java.lang.Integer,JcodTokens.ConstType>
ConstantTypes
protected static int
MaxKeywords
protected static int
MaxTokens
Initialized keyword and token Hash Maps (and Reverse Tables)private static java.util.HashMap<java.lang.String,JcodTokens.ConstType>
NameToConstantType
private static java.util.HashMap<java.lang.String,JcodTokens.Token>
ParsekeyToKeywords
private static java.util.HashMap<java.lang.String,JcodTokens.Token>
ParsekeyToTokens
private static java.util.HashMap<java.lang.String,JcodTokens.Token>
SymbolToKeywords
private static java.util.HashMap<java.lang.String,JcodTokens.Token>
SymbolToTokens
private static java.util.HashMap<java.lang.Integer,JcodTokens.Token>
TagToKeywords
private static java.util.HashMap<java.lang.Integer,JcodTokens.Token>
TagToTokens
-
Constructor Summary
Constructors Constructor Description JcodTokens()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JcodTokens.ConstType
constType(int i)
static JcodTokens.ConstType
constType(java.lang.String parsekey)
static int
constValue(java.lang.String stringValue)
static JcodTokens.Token
keyword_token(int tk)
static JcodTokens.Token
keyword_token(java.lang.String parsekey)
static JcodTokens.Token
keyword_token_ID(java.lang.String ID)
static JcodTokens.Token
keyword_token_ident(java.lang.String idValue)
static int
keyword_token_int(java.lang.String idValue)
static java.lang.String
keywordName(int token)
private static void
registerConstantType(JcodTokens.ConstType tt)
private static void
registerToken(JcodTokens.Token tk)
static JcodTokens.Token
token(int tk)
static JcodTokens.Token
token(java.lang.String parsekey)
static JcodTokens.Token
token_ID(java.lang.String ID)
-
-
-
Field Detail
-
MaxTokens
protected static final int MaxTokens
Initialized keyword and token Hash Maps (and Reverse Tables)- See Also:
- Constant Field Values
-
TagToTokens
private static java.util.HashMap<java.lang.Integer,JcodTokens.Token> TagToTokens
-
SymbolToTokens
private static java.util.HashMap<java.lang.String,JcodTokens.Token> SymbolToTokens
-
ParsekeyToTokens
private static java.util.HashMap<java.lang.String,JcodTokens.Token> ParsekeyToTokens
-
MaxKeywords
protected static final int MaxKeywords
- See Also:
- Constant Field Values
-
TagToKeywords
private static java.util.HashMap<java.lang.Integer,JcodTokens.Token> TagToKeywords
-
SymbolToKeywords
private static java.util.HashMap<java.lang.String,JcodTokens.Token> SymbolToKeywords
-
ParsekeyToKeywords
private static java.util.HashMap<java.lang.String,JcodTokens.Token> ParsekeyToKeywords
-
NameToConstantType
private static java.util.HashMap<java.lang.String,JcodTokens.ConstType> NameToConstantType
-
ConstantTypes
private static java.util.HashMap<java.lang.Integer,JcodTokens.ConstType> ConstantTypes
-
-
Method Detail
-
registerToken
private static void registerToken(JcodTokens.Token tk)
-
token
public static JcodTokens.Token token(int tk)
-
keyword_token
public static JcodTokens.Token keyword_token(int tk)
-
token
public static JcodTokens.Token token(java.lang.String parsekey)
-
keyword_token
public static JcodTokens.Token keyword_token(java.lang.String parsekey)
-
token_ID
public static JcodTokens.Token token_ID(java.lang.String ID)
-
keyword_token_ID
public static JcodTokens.Token keyword_token_ID(java.lang.String ID)
-
keywordName
public static java.lang.String keywordName(int token)
-
keyword_token_ident
public static JcodTokens.Token keyword_token_ident(java.lang.String idValue)
-
keyword_token_int
public static int keyword_token_int(java.lang.String idValue)
-
constType
public static JcodTokens.ConstType constType(int i)
-
constType
public static JcodTokens.ConstType constType(java.lang.String parsekey)
-
registerConstantType
private static void registerConstantType(JcodTokens.ConstType tt)
-
constValue
public static int constValue(java.lang.String stringValue)
-
-