提交 1b8d85f1 编写于 作者: K ksrini

7059905: (javadoc) promote method visibility for netbeans usage

Reviewed-by: jjg, bpatel
上级 06f58d1e
/*
* 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 @@ import com.sun.tools.javac.util.Position;
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);
}
......
/*
* 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 @@ import com.sun.tools.javac.util.Position;
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);
}
......
/*
* 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 @@ public class DocEnv {
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 @@ public class DocEnv {
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 @@ public class DocEnv {
*
* @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 @@ public class DocEnv {
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 @@ public class DocEnv {
}
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 @@ public class DocEnv {
/**
* 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 @@ public class DocEnv {
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 @@ public class DocEnv {
/**
* 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 @@ public class DocEnv {
}
}
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 @@ public class DocEnv {
* 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 @@ public class DocEnv {
* 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);
......
......@@ -92,7 +92,7 @@ public abstract class DocImpl implements Doc, Comparable<Object> {
* So subclasses have the option to do lazy initialization of
* "documentation" string.
*/
String documentation() {
protected String documentation() {
if (documentation == null) documentation = "";
return documentation;
}
......
......@@ -35,7 +35,7 @@ import com.sun.tools.javac.util.Context;
/** 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 @@ class JavadocClassReader extends ClassReader {
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;
......
......@@ -38,7 +38,7 @@ import com.sun.tools.javac.tree.JCTree.*;
* 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)
......
/*
* 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 @@ public class PackageDocImpl extends DocImpl implements PackageDoc {
/**
* Do lazy initialization of "documentation" string.
*/
String documentation() {
protected String documentation() {
if (documentation != null)
return documentation;
if (docPath != null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册