1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Jan 21 01:27:42 2013 -0500 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Feb 04 18:08:53 2013 -0500 1.3 @@ -1831,6 +1831,17 @@ 1.4 } 1.5 1.6 /** 1.7 + * Add the annotation types of the executable receiver. 1.8 + * 1.9 + * @param method the executable to write the receiver annotations for. 1.10 + * @param htmltree the documentation tree to which the annotation info will be 1.11 + * added 1.12 + */ 1.13 + public void addReceiverAnnotationInfo(ExecutableMemberDoc method, Content htmltree) { 1.14 + addAnnotationInfo(method, method.receiverAnnotations(), htmltree); 1.15 + } 1.16 + 1.17 + /** 1.18 * Adds the annotatation types for the given doc. 1.19 * 1.20 * @param doc the package to write annotations for 1.21 @@ -1900,6 +1911,26 @@ 1.22 * documented. 1.23 */ 1.24 private List<String> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak) { 1.25 + return getAnnotations(indent, descList, linkBreak, true); 1.26 + } 1.27 + 1.28 + /** 1.29 + * Return the string representations of the annotation types for 1.30 + * the given doc. 1.31 + * 1.32 + * A {@code null} {@code elementType} indicates that all the 1.33 + * annotations should be returned without any filtering. 1.34 + * 1.35 + * @param indent the number of extra spaces to indent the annotations. 1.36 + * @param descList the array of {@link AnnotationDesc}. 1.37 + * @param linkBreak if true, add new line between each member value. 1.38 + * @param elementType the type of targeted element (used for filtering 1.39 + * type annotations from declaration annotations) 1.40 + * @return an array of strings representing the annotations being 1.41 + * documented. 1.42 + */ 1.43 + public List<String> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak, 1.44 + boolean isJava5DeclarationLocation) { 1.45 List<String> results = new ArrayList<String>(); 1.46 StringBuilder annotation; 1.47 for (int i = 0; i < descList.length; i++) { 1.48 @@ -1913,6 +1944,11 @@ 1.49 (!isAnnotationDocumented && !isContainerDocumented)) { 1.50 continue; 1.51 } 1.52 + /* TODO: check logic here to correctly handle declaration 1.53 + * and type annotations. 1.54 + if (Util.isDeclarationAnnotation(annotationDoc, isJava5DeclarationLocation)) { 1.55 + continue; 1.56 + }*/ 1.57 annotation = new StringBuilder(); 1.58 isAnnotationDocumented = false; 1.59 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,