-
Enhancement
-
Resolution: Fixed
-
P4
-
7
-
b37
-
generic
-
generic
-
Not verified
Consider following refactoring for the compiler:
Parser.Factory -> ParserFactory
Parser -> JavacParser
add new interface
interface Parser {
JCCompilationUnit compilationUnit();
}
with extra methods reverse-engineered from JavacParser as necessary,
so that clients of JavacParser can be clients of new Parser interface.
This all facilitates adding substitutable parsers (i.e. ANTLR),
by changing the ParserFactory.
Parser.Factory -> ParserFactory
Parser -> JavacParser
add new interface
interface Parser {
JCCompilationUnit compilationUnit();
}
with extra methods reverse-engineered from JavacParser as necessary,
so that clients of JavacParser can be clients of new Parser interface.
This all facilitates adding substitutable parsers (i.e. ANTLR),
by changing the ParserFactory.
- relates to
-
JDK-6724118 change JavaCompiler to not use Scanner directly
- Closed