1 /* |
1 /* |
2 * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
42 * deletion without notice.</b> |
42 * deletion without notice.</b> |
43 */ |
43 */ |
44 public class JavapFileManager extends JavacFileManager { |
44 public class JavapFileManager extends JavacFileManager { |
45 private JavapFileManager(Context context, Charset charset) { |
45 private JavapFileManager(Context context, Charset charset) { |
46 super(context, true, charset); |
46 super(context, true, charset); |
47 setIgnoreSymbolFile(true); |
47 setSymbolFileEnabled(false); |
48 } |
48 } |
49 |
49 |
50 public static JavapFileManager create(final DiagnosticListener<? super JavaFileObject> dl, PrintWriter log) { |
50 public static JavapFileManager create(final DiagnosticListener<? super JavaFileObject> dl, PrintWriter log) { |
51 Context javac_context = new Context(); |
51 Context javac_context = new Context(); |
52 |
52 |
54 javac_context.put(DiagnosticListener.class, dl); |
54 javac_context.put(DiagnosticListener.class, dl); |
55 javac_context.put(com.sun.tools.javac.util.Log.outKey, log); |
55 javac_context.put(com.sun.tools.javac.util.Log.outKey, log); |
56 |
56 |
57 return new JavapFileManager(javac_context, null); |
57 return new JavapFileManager(javac_context, null); |
58 } |
58 } |
59 |
|
60 void setIgnoreSymbolFile(boolean b) { |
|
61 ignoreSymbolFile = b; |
|
62 } |
|
63 } |
59 } |