< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/main/OptionHelper.java

Print this page

        

*** 25,34 **** --- 25,35 ---- package com.sun.tools.javac.main; import java.nio.file.Path; + import com.sun.tools.javac.util.JCDiagnostic; import com.sun.tools.javac.util.Log; import com.sun.tools.javac.util.Log.PrefixKind; /** * Helper object to be used by {@link Option#process}, providing access to
*** 61,70 **** --- 62,74 ---- public abstract String getOwnName(); /** Report an error. */ abstract void error(String key, Object... args); + /** Report an error. */ + abstract void error(JCDiagnostic.Error error); + /** Record a file to be compiled. */ abstract void addFile(Path p); /** Record the name of a class for annotation processing. */ abstract void addClassName(String s);
*** 111,120 **** --- 115,129 ---- void error(String key, Object... args) { throw new IllegalArgumentException(log.localize(PrefixKind.JAVAC, key, args)); } @Override + void error(JCDiagnostic.Error error) { + throw new IllegalArgumentException(log.localize(error)); + } + + @Override public void addFile(Path p) { throw new IllegalArgumentException(p.toString()); } @Override
< prev index next >