Thu, 30 Jun 2011 14:33:45 -0700
7059905: (javadoc) promote method visibility for netbeans usage
Reviewed-by: jjg, bpatel
1.1 --- a/src/share/classes/com/sun/tools/javadoc/AnnotationTypeDocImpl.java Thu Jun 30 12:00:53 2011 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javadoc/AnnotationTypeDocImpl.java Thu Jun 30 14:33:45 2011 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -46,11 +46,11 @@ 1.11 public class AnnotationTypeDocImpl 1.12 extends ClassDocImpl implements AnnotationTypeDoc { 1.13 1.14 - AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym) { 1.15 + public AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym) { 1.16 this(env, sym, null, null, null); 1.17 } 1.18 1.19 - AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym, 1.20 + public AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym, 1.21 String doc, JCClassDecl tree, Position.LineMap lineMap) { 1.22 super(env, sym, doc, tree, lineMap); 1.23 }
2.1 --- a/src/share/classes/com/sun/tools/javadoc/AnnotationTypeElementDocImpl.java Thu Jun 30 12:00:53 2011 -0700 2.2 +++ b/src/share/classes/com/sun/tools/javadoc/AnnotationTypeElementDocImpl.java Thu Jun 30 14:33:45 2011 -0700 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 2.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 * 2.9 * This code is free software; you can redistribute it and/or modify it 2.10 @@ -45,11 +45,11 @@ 2.11 public class AnnotationTypeElementDocImpl 2.12 extends MethodDocImpl implements AnnotationTypeElementDoc { 2.13 2.14 - AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym) { 2.15 + public AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym) { 2.16 super(env, sym); 2.17 } 2.18 2.19 - AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym, 2.20 + public AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym, 2.21 String doc, JCMethodDecl tree, Position.LineMap lineMap) { 2.22 super(env, sym, doc, tree, lineMap); 2.23 }
3.1 --- a/src/share/classes/com/sun/tools/javadoc/DocEnv.java Thu Jun 30 12:00:53 2011 -0700 3.2 +++ b/src/share/classes/com/sun/tools/javadoc/DocEnv.java Thu Jun 30 14:33:45 2011 -0700 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -84,7 +84,7 @@ 3.11 final Symbol externalizableSym; 3.12 3.13 /** Access filter (public, protected, ...). */ 3.14 - ModifierFilter showAccess; 3.15 + protected ModifierFilter showAccess; 3.16 3.17 /** True if we are using a sentence BreakIterator. */ 3.18 boolean breakiterator; 3.19 @@ -102,7 +102,7 @@ 3.20 boolean docClasses = false; 3.21 3.22 /** Does the doclet only expect pre-1.5 doclet API? */ 3.23 - boolean legacyDoclet = true; 3.24 + protected boolean legacyDoclet = true; 3.25 3.26 /** 3.27 * Set this to true if you would like to not emit any errors, warnings and 3.28 @@ -115,7 +115,7 @@ 3.29 * 3.30 * @param context Context for this javadoc instance. 3.31 */ 3.32 - private DocEnv(Context context) { 3.33 + protected DocEnv(Context context) { 3.34 context.put(docEnvKey, this); 3.35 3.36 messager = Messager.instance0(context); 3.37 @@ -517,7 +517,7 @@ 3.38 messager.exit(); 3.39 } 3.40 3.41 - private Map<PackageSymbol, PackageDocImpl> packageMap = 3.42 + protected Map<PackageSymbol, PackageDocImpl> packageMap = 3.43 new HashMap<PackageSymbol, PackageDocImpl>(); 3.44 /** 3.45 * Return the PackageDoc of this package symbol. 3.46 @@ -545,12 +545,12 @@ 3.47 } 3.48 3.49 3.50 - private Map<ClassSymbol, ClassDocImpl> classMap = 3.51 + protected Map<ClassSymbol, ClassDocImpl> classMap = 3.52 new HashMap<ClassSymbol, ClassDocImpl>(); 3.53 /** 3.54 * Return the ClassDoc (or a subtype) of this class symbol. 3.55 */ 3.56 - ClassDocImpl getClassDoc(ClassSymbol clazz) { 3.57 + public ClassDocImpl getClassDoc(ClassSymbol clazz) { 3.58 ClassDocImpl result = classMap.get(clazz); 3.59 if (result != null) return result; 3.60 if (isAnnotationType(clazz)) { 3.61 @@ -565,7 +565,7 @@ 3.62 /** 3.63 * Create the ClassDoc (or a subtype) for a class symbol. 3.64 */ 3.65 - void makeClassDoc(ClassSymbol clazz, String docComment, JCClassDecl tree, Position.LineMap lineMap) { 3.66 + protected void makeClassDoc(ClassSymbol clazz, String docComment, JCClassDecl tree, Position.LineMap lineMap) { 3.67 ClassDocImpl result = classMap.get(clazz); 3.68 if (result != null) { 3.69 if (docComment != null) result.setRawCommentText(docComment); 3.70 @@ -580,20 +580,20 @@ 3.71 classMap.put(clazz, result); 3.72 } 3.73 3.74 - private static boolean isAnnotationType(ClassSymbol clazz) { 3.75 + protected static boolean isAnnotationType(ClassSymbol clazz) { 3.76 return ClassDocImpl.isAnnotationType(clazz); 3.77 } 3.78 3.79 - private static boolean isAnnotationType(JCClassDecl tree) { 3.80 + protected static boolean isAnnotationType(JCClassDecl tree) { 3.81 return (tree.mods.flags & Flags.ANNOTATION) != 0; 3.82 } 3.83 3.84 - private Map<VarSymbol, FieldDocImpl> fieldMap = 3.85 + protected Map<VarSymbol, FieldDocImpl> fieldMap = 3.86 new HashMap<VarSymbol, FieldDocImpl>(); 3.87 /** 3.88 * Return the FieldDoc of this var symbol. 3.89 */ 3.90 - FieldDocImpl getFieldDoc(VarSymbol var) { 3.91 + public FieldDocImpl getFieldDoc(VarSymbol var) { 3.92 FieldDocImpl result = fieldMap.get(var); 3.93 if (result != null) return result; 3.94 result = new FieldDocImpl(this, var); 3.95 @@ -603,7 +603,7 @@ 3.96 /** 3.97 * Create a FieldDoc for a var symbol. 3.98 */ 3.99 - void makeFieldDoc(VarSymbol var, String docComment, JCVariableDecl tree, Position.LineMap lineMap) { 3.100 + protected void makeFieldDoc(VarSymbol var, String docComment, JCVariableDecl tree, Position.LineMap lineMap) { 3.101 FieldDocImpl result = fieldMap.get(var); 3.102 if (result != null) { 3.103 if (docComment != null) result.setRawCommentText(docComment); 3.104 @@ -614,13 +614,13 @@ 3.105 } 3.106 } 3.107 3.108 - private Map<MethodSymbol, ExecutableMemberDocImpl> methodMap = 3.109 + protected Map<MethodSymbol, ExecutableMemberDocImpl> methodMap = 3.110 new HashMap<MethodSymbol, ExecutableMemberDocImpl>(); 3.111 /** 3.112 * Create a MethodDoc for this MethodSymbol. 3.113 * Should be called only on symbols representing methods. 3.114 */ 3.115 - void makeMethodDoc(MethodSymbol meth, String docComment, 3.116 + protected void makeMethodDoc(MethodSymbol meth, String docComment, 3.117 JCMethodDecl tree, Position.LineMap lineMap) { 3.118 MethodDocImpl result = (MethodDocImpl)methodMap.get(meth); 3.119 if (result != null) { 3.120 @@ -649,7 +649,7 @@ 3.121 * Create the ConstructorDoc for a MethodSymbol. 3.122 * Should be called only on symbols representing constructors. 3.123 */ 3.124 - void makeConstructorDoc(MethodSymbol meth, String docComment, 3.125 + protected void makeConstructorDoc(MethodSymbol meth, String docComment, 3.126 JCMethodDecl tree, Position.LineMap lineMap) { 3.127 ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth); 3.128 if (result != null) { 3.129 @@ -678,7 +678,7 @@ 3.130 * Create the AnnotationTypeElementDoc for a MethodSymbol. 3.131 * Should be called only on symbols representing annotation type elements. 3.132 */ 3.133 - void makeAnnotationTypeElementDoc(MethodSymbol meth, 3.134 + protected void makeAnnotationTypeElementDoc(MethodSymbol meth, 3.135 String docComment, JCMethodDecl tree, Position.LineMap lineMap) { 3.136 AnnotationTypeElementDocImpl result = 3.137 (AnnotationTypeElementDocImpl)methodMap.get(meth);
4.1 --- a/src/share/classes/com/sun/tools/javadoc/DocImpl.java Thu Jun 30 12:00:53 2011 -0700 4.2 +++ b/src/share/classes/com/sun/tools/javadoc/DocImpl.java Thu Jun 30 14:33:45 2011 -0700 4.3 @@ -92,7 +92,7 @@ 4.4 * So subclasses have the option to do lazy initialization of 4.5 * "documentation" string. 4.6 */ 4.7 - String documentation() { 4.8 + protected String documentation() { 4.9 if (documentation == null) documentation = ""; 4.10 return documentation; 4.11 }
5.1 --- a/src/share/classes/com/sun/tools/javadoc/JavadocClassReader.java Thu Jun 30 12:00:53 2011 -0700 5.2 +++ b/src/share/classes/com/sun/tools/javadoc/JavadocClassReader.java Thu Jun 30 14:33:45 2011 -0700 5.3 @@ -35,7 +35,7 @@ 5.4 /** Javadoc uses an extended class reader that records package.html entries 5.5 * @author Neal Gafter 5.6 */ 5.7 -class JavadocClassReader extends ClassReader { 5.8 +public class JavadocClassReader extends ClassReader { 5.9 5.10 public static JavadocClassReader instance0(Context context) { 5.11 ClassReader instance = context.get(classReaderKey); 5.12 @@ -59,7 +59,7 @@ 5.13 private EnumSet<JavaFileObject.Kind> noSource = EnumSet.of(JavaFileObject.Kind.CLASS, 5.14 JavaFileObject.Kind.HTML); 5.15 5.16 - private JavadocClassReader(Context context) { 5.17 + public JavadocClassReader(Context context) { 5.18 super(context, true); 5.19 docenv = DocEnv.instance(context); 5.20 preferSource = true;
6.1 --- a/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java Thu Jun 30 12:00:53 2011 -0700 6.2 +++ b/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java Thu Jun 30 14:33:45 2011 -0700 6.3 @@ -38,7 +38,7 @@ 6.4 * done by javac. 6.5 * @author Neal Gafter 6.6 */ 6.7 -class JavadocMemberEnter extends MemberEnter { 6.8 +public class JavadocMemberEnter extends MemberEnter { 6.9 public static JavadocMemberEnter instance0(Context context) { 6.10 MemberEnter instance = context.get(memberEnterKey); 6.11 if (instance == null)
7.1 --- a/src/share/classes/com/sun/tools/javadoc/PackageDocImpl.java Thu Jun 30 12:00:53 2011 -0700 7.2 +++ b/src/share/classes/com/sun/tools/javadoc/PackageDocImpl.java Thu Jun 30 14:33:45 2011 -0700 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 7.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 * 7.9 * This code is free software; you can redistribute it and/or modify it 7.10 @@ -96,7 +96,7 @@ 7.11 /** 7.12 * Do lazy initialization of "documentation" string. 7.13 */ 7.14 - String documentation() { 7.15 + protected String documentation() { 7.16 if (documentation != null) 7.17 return documentation; 7.18 if (docPath != null) {