7059905: (javadoc) promote method visibility for netbeans usage
authorksrini
Thu, 30 Jun 2011 14:33:45 -0700
changeset 10189 57268b86d4da
parent 10187 983f0e987540
child 10190 11c701650189
7059905: (javadoc) promote method visibility for netbeans usage Reviewed-by: jjg, bpatel
langtools/src/share/classes/com/sun/tools/javadoc/AnnotationTypeDocImpl.java
langtools/src/share/classes/com/sun/tools/javadoc/AnnotationTypeElementDocImpl.java
langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
langtools/src/share/classes/com/sun/tools/javadoc/DocImpl.java
langtools/src/share/classes/com/sun/tools/javadoc/JavadocClassReader.java
langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java
langtools/src/share/classes/com/sun/tools/javadoc/PackageDocImpl.java
--- a/langtools/src/share/classes/com/sun/tools/javadoc/AnnotationTypeDocImpl.java	Thu Jun 30 12:00:53 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/AnnotationTypeDocImpl.java	Thu Jun 30 14:33:45 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,11 +46,11 @@
 public class AnnotationTypeDocImpl
         extends ClassDocImpl implements AnnotationTypeDoc {
 
-    AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym) {
+    public AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym) {
         this(env, sym, null, null, null);
     }
 
-    AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym,
+    public AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym,
                           String doc, JCClassDecl tree, Position.LineMap lineMap) {
         super(env, sym, doc, tree, lineMap);
     }
--- a/langtools/src/share/classes/com/sun/tools/javadoc/AnnotationTypeElementDocImpl.java	Thu Jun 30 12:00:53 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/AnnotationTypeElementDocImpl.java	Thu Jun 30 14:33:45 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,11 +45,11 @@
 public class AnnotationTypeElementDocImpl
         extends MethodDocImpl implements AnnotationTypeElementDoc {
 
-    AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym) {
+    public AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym) {
         super(env, sym);
     }
 
-    AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym,
+    public AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym,
                                  String doc, JCMethodDecl tree, Position.LineMap lineMap) {
         super(env, sym, doc, tree, lineMap);
     }
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java	Thu Jun 30 12:00:53 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java	Thu Jun 30 14:33:45 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -84,7 +84,7 @@
     final Symbol externalizableSym;
 
     /** Access filter (public, protected, ...).  */
-    ModifierFilter showAccess;
+    protected ModifierFilter showAccess;
 
     /** True if we are using a sentence BreakIterator. */
     boolean breakiterator;
@@ -102,7 +102,7 @@
     boolean docClasses = false;
 
     /** Does the doclet only expect pre-1.5 doclet API? */
-    boolean legacyDoclet = true;
+    protected boolean legacyDoclet = true;
 
     /**
      * Set this to true if you would like to not emit any errors, warnings and
@@ -115,7 +115,7 @@
      *
      * @param context      Context for this javadoc instance.
      */
-    private DocEnv(Context context) {
+    protected DocEnv(Context context) {
         context.put(docEnvKey, this);
 
         messager = Messager.instance0(context);
@@ -517,7 +517,7 @@
         messager.exit();
     }
 
-    private Map<PackageSymbol, PackageDocImpl> packageMap =
+    protected Map<PackageSymbol, PackageDocImpl> packageMap =
             new HashMap<PackageSymbol, PackageDocImpl>();
     /**
      * Return the PackageDoc of this package symbol.
@@ -545,12 +545,12 @@
     }
 
 
-    private Map<ClassSymbol, ClassDocImpl> classMap =
+    protected Map<ClassSymbol, ClassDocImpl> classMap =
             new HashMap<ClassSymbol, ClassDocImpl>();
     /**
      * Return the ClassDoc (or a subtype) of this class symbol.
      */
-    ClassDocImpl getClassDoc(ClassSymbol clazz) {
+    public ClassDocImpl getClassDoc(ClassSymbol clazz) {
         ClassDocImpl result = classMap.get(clazz);
         if (result != null) return result;
         if (isAnnotationType(clazz)) {
@@ -565,7 +565,7 @@
     /**
      * Create the ClassDoc (or a subtype) for a class symbol.
      */
-    void makeClassDoc(ClassSymbol clazz, String docComment, JCClassDecl tree, Position.LineMap lineMap) {
+    protected void makeClassDoc(ClassSymbol clazz, String docComment, JCClassDecl tree, Position.LineMap lineMap) {
         ClassDocImpl result = classMap.get(clazz);
         if (result != null) {
             if (docComment != null) result.setRawCommentText(docComment);
@@ -580,20 +580,20 @@
         classMap.put(clazz, result);
     }
 
-    private static boolean isAnnotationType(ClassSymbol clazz) {
+    protected static boolean isAnnotationType(ClassSymbol clazz) {
         return ClassDocImpl.isAnnotationType(clazz);
     }
 
-    private static boolean isAnnotationType(JCClassDecl tree) {
+    protected static boolean isAnnotationType(JCClassDecl tree) {
         return (tree.mods.flags & Flags.ANNOTATION) != 0;
     }
 
-    private Map<VarSymbol, FieldDocImpl> fieldMap =
+    protected Map<VarSymbol, FieldDocImpl> fieldMap =
             new HashMap<VarSymbol, FieldDocImpl>();
     /**
      * Return the FieldDoc of this var symbol.
      */
-    FieldDocImpl getFieldDoc(VarSymbol var) {
+    public FieldDocImpl getFieldDoc(VarSymbol var) {
         FieldDocImpl result = fieldMap.get(var);
         if (result != null) return result;
         result = new FieldDocImpl(this, var);
@@ -603,7 +603,7 @@
     /**
      * Create a FieldDoc for a var symbol.
      */
-    void makeFieldDoc(VarSymbol var, String docComment, JCVariableDecl tree, Position.LineMap lineMap) {
+    protected void makeFieldDoc(VarSymbol var, String docComment, JCVariableDecl tree, Position.LineMap lineMap) {
         FieldDocImpl result = fieldMap.get(var);
         if (result != null) {
             if (docComment != null) result.setRawCommentText(docComment);
@@ -614,13 +614,13 @@
         }
     }
 
-    private Map<MethodSymbol, ExecutableMemberDocImpl> methodMap =
+    protected Map<MethodSymbol, ExecutableMemberDocImpl> methodMap =
             new HashMap<MethodSymbol, ExecutableMemberDocImpl>();
     /**
      * Create a MethodDoc for this MethodSymbol.
      * Should be called only on symbols representing methods.
      */
-    void makeMethodDoc(MethodSymbol meth, String docComment,
+    protected void makeMethodDoc(MethodSymbol meth, String docComment,
                        JCMethodDecl tree, Position.LineMap lineMap) {
         MethodDocImpl result = (MethodDocImpl)methodMap.get(meth);
         if (result != null) {
@@ -649,7 +649,7 @@
      * Create the ConstructorDoc for a MethodSymbol.
      * Should be called only on symbols representing constructors.
      */
-    void makeConstructorDoc(MethodSymbol meth, String docComment,
+    protected void makeConstructorDoc(MethodSymbol meth, String docComment,
                             JCMethodDecl tree, Position.LineMap lineMap) {
         ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth);
         if (result != null) {
@@ -678,7 +678,7 @@
      * Create the AnnotationTypeElementDoc for a MethodSymbol.
      * Should be called only on symbols representing annotation type elements.
      */
-    void makeAnnotationTypeElementDoc(MethodSymbol meth,
+    protected void makeAnnotationTypeElementDoc(MethodSymbol meth,
                                       String docComment, JCMethodDecl tree, Position.LineMap lineMap) {
         AnnotationTypeElementDocImpl result =
             (AnnotationTypeElementDocImpl)methodMap.get(meth);
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocImpl.java	Thu Jun 30 12:00:53 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocImpl.java	Thu Jun 30 14:33:45 2011 -0700
@@ -92,7 +92,7 @@
      * So subclasses have the option to do lazy initialization of
      * "documentation" string.
      */
-    String documentation() {
+    protected String documentation() {
         if (documentation == null) documentation = "";
         return documentation;
     }
--- a/langtools/src/share/classes/com/sun/tools/javadoc/JavadocClassReader.java	Thu Jun 30 12:00:53 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/JavadocClassReader.java	Thu Jun 30 14:33:45 2011 -0700
@@ -35,7 +35,7 @@
 /** Javadoc uses an extended class reader that records package.html entries
  *  @author Neal Gafter
  */
-class JavadocClassReader extends ClassReader {
+public class JavadocClassReader extends ClassReader {
 
     public static JavadocClassReader instance0(Context context) {
         ClassReader instance = context.get(classReaderKey);
@@ -59,7 +59,7 @@
     private EnumSet<JavaFileObject.Kind> noSource = EnumSet.of(JavaFileObject.Kind.CLASS,
                                                                JavaFileObject.Kind.HTML);
 
-    private JavadocClassReader(Context context) {
+    public JavadocClassReader(Context context) {
         super(context, true);
         docenv = DocEnv.instance(context);
         preferSource = true;
--- a/langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java	Thu Jun 30 12:00:53 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java	Thu Jun 30 14:33:45 2011 -0700
@@ -38,7 +38,7 @@
  *  done by javac.
  *  @author Neal Gafter
  */
-class JavadocMemberEnter extends MemberEnter {
+public class JavadocMemberEnter extends MemberEnter {
     public static JavadocMemberEnter instance0(Context context) {
         MemberEnter instance = context.get(memberEnterKey);
         if (instance == null)
--- a/langtools/src/share/classes/com/sun/tools/javadoc/PackageDocImpl.java	Thu Jun 30 12:00:53 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/PackageDocImpl.java	Thu Jun 30 14:33:45 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -96,7 +96,7 @@
     /**
      * Do lazy initialization of "documentation" string.
      */
-    String documentation() {
+    protected String documentation() {
         if (documentation != null)
             return documentation;
         if (docPath != null) {