38 |
38 |
39 import com.sun.tools.doclint.DocLint; |
39 import com.sun.tools.doclint.DocLint; |
40 import com.sun.tools.javac.code.Lint; |
40 import com.sun.tools.javac.code.Lint; |
41 import com.sun.tools.javac.code.Source; |
41 import com.sun.tools.javac.code.Source; |
42 import com.sun.tools.javac.code.Type; |
42 import com.sun.tools.javac.code.Type; |
|
43 import com.sun.tools.javac.jvm.Profile; |
43 import com.sun.tools.javac.jvm.Target; |
44 import com.sun.tools.javac.jvm.Target; |
44 import com.sun.tools.javac.processing.JavacProcessingEnvironment; |
45 import com.sun.tools.javac.processing.JavacProcessingEnvironment; |
45 import com.sun.tools.javac.util.Log; |
46 import com.sun.tools.javac.util.Log; |
46 import com.sun.tools.javac.util.Log.PrefixKind; |
47 import com.sun.tools.javac.util.Log.PrefixKind; |
47 import com.sun.tools.javac.util.Log.WriterKind; |
48 import com.sun.tools.javac.util.Log.WriterKind; |
210 @Override |
211 @Override |
211 public boolean process(OptionHelper helper, String option, String operand) { |
212 public boolean process(OptionHelper helper, String option, String operand) { |
212 Target target = Target.lookup(operand); |
213 Target target = Target.lookup(operand); |
213 if (target == null) { |
214 if (target == null) { |
214 helper.error("err.invalid.target", operand); |
215 helper.error("err.invalid.target", operand); |
|
216 return true; |
|
217 } |
|
218 return super.process(helper, option, operand); |
|
219 } |
|
220 }, |
|
221 |
|
222 PROFILE("-profile", "opt.arg.profile", "opt.profile", STANDARD, BASIC) { |
|
223 @Override |
|
224 public boolean process(OptionHelper helper, String option, String operand) { |
|
225 Profile profile = Profile.lookup(operand); |
|
226 if (profile == null) { |
|
227 helper.error("err.invalid.profile", operand); |
215 return true; |
228 return true; |
216 } |
229 } |
217 return super.process(helper, option, operand); |
230 return super.process(helper, option, operand); |
218 } |
231 } |
219 }, |
232 }, |