-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 7
-
Component/s: tools
-
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
-