modules/graphics/src/main/java/javafx/css/CssLexer.java
Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization
@@ -21,29 +21,23 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-package com.sun.javafx.css.parser;
+package javafx.css;
import java.io.IOException;
import java.io.Reader;
import java.util.HashMap;
import java.util.Map;
+import com.sun.javafx.css.parser.LexerState;
+import com.sun.javafx.css.parser.Recognizer;
+import com.sun.javafx.css.parser.Token;
-final class CSSLexer {
-
- /* Lazy instantiation */
- private static class InstanceHolder {
- final static CSSLexer INSTANCE = new CSSLexer();
- }
-
- public static CSSLexer getInstance() {
- return InstanceHolder.INSTANCE;
- }
+final class CssLexer {
final static int STRING = 10;
final static int IDENT = 11;
final static int FUNCTION = 12;
final static int NUMBER = 13;
final static int CM = 14;
@@ -352,17 +346,17 @@
);
return map;
}
- CSSLexer() {
+ CssLexer() {
this.stateMap = createStateMap();
this.text = new StringBuilder(64);
this.currentState = initState;
}
- public void setReader(Reader reader) {
+ void setReader(Reader reader) {
this.reader = reader;
lastc = -1;
pos = offset = 0;
line = 1;
this.currentState = initState;
@@ -750,11 +744,11 @@
lastc = c;
return c;
}
- public Token nextToken() {
+ Token nextToken() {
Token tok = null;
if (token != null) {
tok = token;
if (token.getType() != Token.EOF) token = null;