1 /* |
1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2011, 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 if (instance == null) |
42 if (instance == null) |
43 instance = new JavadocClassReader(context); |
43 instance = new JavadocClassReader(context); |
44 return (JavadocClassReader)instance; |
44 return (JavadocClassReader)instance; |
45 } |
45 } |
46 |
46 |
47 public static void preRegister(final Context context) { |
47 public static void preRegister(Context context) { |
48 context.put(classReaderKey, new Context.Factory<ClassReader>() { |
48 context.put(classReaderKey, new Context.Factory<ClassReader>() { |
49 public ClassReader make() { |
49 public ClassReader make(Context c) { |
50 return new JavadocClassReader(context); |
50 return new JavadocClassReader(c); |
51 } |
51 } |
52 }); |
52 }); |
53 } |
53 } |
54 |
54 |
55 private DocEnv docenv; |
55 private DocEnv docenv; |