mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
7059905: (javadoc) promote method visibility for netbeans usage
Reviewed-by: jjg, bpatel
This commit is contained in:
parent
00fd0bdcfd
commit
37aa419c8a
7 changed files with 29 additions and 29 deletions
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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
|
public class AnnotationTypeDocImpl
|
||||||
extends ClassDocImpl implements AnnotationTypeDoc {
|
extends ClassDocImpl implements AnnotationTypeDoc {
|
||||||
|
|
||||||
AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym) {
|
public AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym) {
|
||||||
this(env, sym, null, null, null);
|
this(env, sym, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym,
|
public AnnotationTypeDocImpl(DocEnv env, ClassSymbol sym,
|
||||||
String doc, JCClassDecl tree, Position.LineMap lineMap) {
|
String doc, JCClassDecl tree, Position.LineMap lineMap) {
|
||||||
super(env, sym, doc, tree, lineMap);
|
super(env, sym, doc, tree, lineMap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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
|
public class AnnotationTypeElementDocImpl
|
||||||
extends MethodDocImpl implements AnnotationTypeElementDoc {
|
extends MethodDocImpl implements AnnotationTypeElementDoc {
|
||||||
|
|
||||||
AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym) {
|
public AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym) {
|
||||||
super(env, sym);
|
super(env, sym);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym,
|
public AnnotationTypeElementDocImpl(DocEnv env, MethodSymbol sym,
|
||||||
String doc, JCMethodDecl tree, Position.LineMap lineMap) {
|
String doc, JCMethodDecl tree, Position.LineMap lineMap) {
|
||||||
super(env, sym, doc, tree, lineMap);
|
super(env, sym, doc, tree, lineMap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -84,7 +84,7 @@ public class DocEnv {
|
||||||
final Symbol externalizableSym;
|
final Symbol externalizableSym;
|
||||||
|
|
||||||
/** Access filter (public, protected, ...). */
|
/** Access filter (public, protected, ...). */
|
||||||
ModifierFilter showAccess;
|
protected ModifierFilter showAccess;
|
||||||
|
|
||||||
/** True if we are using a sentence BreakIterator. */
|
/** True if we are using a sentence BreakIterator. */
|
||||||
boolean breakiterator;
|
boolean breakiterator;
|
||||||
|
@ -102,7 +102,7 @@ public class DocEnv {
|
||||||
boolean docClasses = false;
|
boolean docClasses = false;
|
||||||
|
|
||||||
/** Does the doclet only expect pre-1.5 doclet API? */
|
/** 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
|
* 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.
|
* @param context Context for this javadoc instance.
|
||||||
*/
|
*/
|
||||||
private DocEnv(Context context) {
|
protected DocEnv(Context context) {
|
||||||
context.put(docEnvKey, this);
|
context.put(docEnvKey, this);
|
||||||
|
|
||||||
messager = Messager.instance0(context);
|
messager = Messager.instance0(context);
|
||||||
|
@ -517,7 +517,7 @@ public class DocEnv {
|
||||||
messager.exit();
|
messager.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<PackageSymbol, PackageDocImpl> packageMap =
|
protected Map<PackageSymbol, PackageDocImpl> packageMap =
|
||||||
new HashMap<PackageSymbol, PackageDocImpl>();
|
new HashMap<PackageSymbol, PackageDocImpl>();
|
||||||
/**
|
/**
|
||||||
* Return the PackageDoc of this package symbol.
|
* 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>();
|
new HashMap<ClassSymbol, ClassDocImpl>();
|
||||||
/**
|
/**
|
||||||
* Return the ClassDoc (or a subtype) of this class symbol.
|
* Return the ClassDoc (or a subtype) of this class symbol.
|
||||||
*/
|
*/
|
||||||
ClassDocImpl getClassDoc(ClassSymbol clazz) {
|
public ClassDocImpl getClassDoc(ClassSymbol clazz) {
|
||||||
ClassDocImpl result = classMap.get(clazz);
|
ClassDocImpl result = classMap.get(clazz);
|
||||||
if (result != null) return result;
|
if (result != null) return result;
|
||||||
if (isAnnotationType(clazz)) {
|
if (isAnnotationType(clazz)) {
|
||||||
|
@ -565,7 +565,7 @@ public class DocEnv {
|
||||||
/**
|
/**
|
||||||
* Create the ClassDoc (or a subtype) for a class symbol.
|
* 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);
|
ClassDocImpl result = classMap.get(clazz);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (docComment != null) result.setRawCommentText(docComment);
|
if (docComment != null) result.setRawCommentText(docComment);
|
||||||
|
@ -580,20 +580,20 @@ public class DocEnv {
|
||||||
classMap.put(clazz, result);
|
classMap.put(clazz, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isAnnotationType(ClassSymbol clazz) {
|
protected static boolean isAnnotationType(ClassSymbol clazz) {
|
||||||
return ClassDocImpl.isAnnotationType(clazz);
|
return ClassDocImpl.isAnnotationType(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isAnnotationType(JCClassDecl tree) {
|
protected static boolean isAnnotationType(JCClassDecl tree) {
|
||||||
return (tree.mods.flags & Flags.ANNOTATION) != 0;
|
return (tree.mods.flags & Flags.ANNOTATION) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<VarSymbol, FieldDocImpl> fieldMap =
|
protected Map<VarSymbol, FieldDocImpl> fieldMap =
|
||||||
new HashMap<VarSymbol, FieldDocImpl>();
|
new HashMap<VarSymbol, FieldDocImpl>();
|
||||||
/**
|
/**
|
||||||
* Return the FieldDoc of this var symbol.
|
* Return the FieldDoc of this var symbol.
|
||||||
*/
|
*/
|
||||||
FieldDocImpl getFieldDoc(VarSymbol var) {
|
public FieldDocImpl getFieldDoc(VarSymbol var) {
|
||||||
FieldDocImpl result = fieldMap.get(var);
|
FieldDocImpl result = fieldMap.get(var);
|
||||||
if (result != null) return result;
|
if (result != null) return result;
|
||||||
result = new FieldDocImpl(this, var);
|
result = new FieldDocImpl(this, var);
|
||||||
|
@ -603,7 +603,7 @@ public class DocEnv {
|
||||||
/**
|
/**
|
||||||
* Create a FieldDoc for a var symbol.
|
* 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);
|
FieldDocImpl result = fieldMap.get(var);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (docComment != null) result.setRawCommentText(docComment);
|
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>();
|
new HashMap<MethodSymbol, ExecutableMemberDocImpl>();
|
||||||
/**
|
/**
|
||||||
* Create a MethodDoc for this MethodSymbol.
|
* Create a MethodDoc for this MethodSymbol.
|
||||||
* Should be called only on symbols representing methods.
|
* 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) {
|
JCMethodDecl tree, Position.LineMap lineMap) {
|
||||||
MethodDocImpl result = (MethodDocImpl)methodMap.get(meth);
|
MethodDocImpl result = (MethodDocImpl)methodMap.get(meth);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
@ -649,7 +649,7 @@ public class DocEnv {
|
||||||
* Create the ConstructorDoc for a MethodSymbol.
|
* Create the ConstructorDoc for a MethodSymbol.
|
||||||
* Should be called only on symbols representing constructors.
|
* 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) {
|
JCMethodDecl tree, Position.LineMap lineMap) {
|
||||||
ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth);
|
ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
@ -678,7 +678,7 @@ public class DocEnv {
|
||||||
* Create the AnnotationTypeElementDoc for a MethodSymbol.
|
* Create the AnnotationTypeElementDoc for a MethodSymbol.
|
||||||
* Should be called only on symbols representing annotation type elements.
|
* 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) {
|
String docComment, JCMethodDecl tree, Position.LineMap lineMap) {
|
||||||
AnnotationTypeElementDocImpl result =
|
AnnotationTypeElementDocImpl result =
|
||||||
(AnnotationTypeElementDocImpl)methodMap.get(meth);
|
(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
|
* So subclasses have the option to do lazy initialization of
|
||||||
* "documentation" string.
|
* "documentation" string.
|
||||||
*/
|
*/
|
||||||
String documentation() {
|
protected String documentation() {
|
||||||
if (documentation == null) documentation = "";
|
if (documentation == null) documentation = "";
|
||||||
return 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
|
/** Javadoc uses an extended class reader that records package.html entries
|
||||||
* @author Neal Gafter
|
* @author Neal Gafter
|
||||||
*/
|
*/
|
||||||
class JavadocClassReader extends ClassReader {
|
public class JavadocClassReader extends ClassReader {
|
||||||
|
|
||||||
public static JavadocClassReader instance0(Context context) {
|
public static JavadocClassReader instance0(Context context) {
|
||||||
ClassReader instance = context.get(classReaderKey);
|
ClassReader instance = context.get(classReaderKey);
|
||||||
|
@ -59,7 +59,7 @@ class JavadocClassReader extends ClassReader {
|
||||||
private EnumSet<JavaFileObject.Kind> noSource = EnumSet.of(JavaFileObject.Kind.CLASS,
|
private EnumSet<JavaFileObject.Kind> noSource = EnumSet.of(JavaFileObject.Kind.CLASS,
|
||||||
JavaFileObject.Kind.HTML);
|
JavaFileObject.Kind.HTML);
|
||||||
|
|
||||||
private JavadocClassReader(Context context) {
|
public JavadocClassReader(Context context) {
|
||||||
super(context, true);
|
super(context, true);
|
||||||
docenv = DocEnv.instance(context);
|
docenv = DocEnv.instance(context);
|
||||||
preferSource = true;
|
preferSource = true;
|
||||||
|
|
|
@ -38,7 +38,7 @@ import com.sun.tools.javac.tree.JCTree.*;
|
||||||
* done by javac.
|
* done by javac.
|
||||||
* @author Neal Gafter
|
* @author Neal Gafter
|
||||||
*/
|
*/
|
||||||
class JavadocMemberEnter extends MemberEnter {
|
public class JavadocMemberEnter extends MemberEnter {
|
||||||
public static JavadocMemberEnter instance0(Context context) {
|
public static JavadocMemberEnter instance0(Context context) {
|
||||||
MemberEnter instance = context.get(memberEnterKey);
|
MemberEnter instance = context.get(memberEnterKey);
|
||||||
if (instance == null)
|
if (instance == null)
|
||||||
|
|
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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.
|
* Do lazy initialization of "documentation" string.
|
||||||
*/
|
*/
|
||||||
String documentation() {
|
protected String documentation() {
|
||||||
if (documentation != null)
|
if (documentation != null)
|
||||||
return documentation;
|
return documentation;
|
||||||
if (docPath != null) {
|
if (docPath != null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue