/** * Write the annotatation types for the given packageDoc. * * @param packageDoc the package to write annotations for. */ public void writeAnnotationInfo( PackageDoc packageDoc ) { writeAnnotationInfo( packageDoc, packageDoc.annotations() ); }
/** * Adds the annotatation types for the given packageDoc. * * @param packageDoc the package to write annotations for. * @param htmltree the documentation tree to which the annotation info will be * added */ public void addAnnotationInfo(PackageDoc packageDoc, Content htmltree) { addAnnotationInfo(packageDoc, packageDoc.annotations(), htmltree); }
/** * Map the AnnotationType to the ProgramElementDocs that use them as * type parameters. * * @param map the map the insert the information into. * @param doc the doc whose type parameters are being checked. * @param holder the holder that owns the type parameters. */ private <T extends PackageDoc> void mapAnnotations(Map<String,List<T>> map, PackageDoc doc, T holder) { AnnotationDesc[] annotations; annotations = doc.annotations(); for (int i = 0; i < annotations.length; i++) { AnnotationTypeDoc annotationDoc = annotations[i].annotationType(); refList(map, annotationDoc).add(holder); } }
/** * Map the AnnotationType to the ProgramElementDocs that use them as * type parameters. * * @param map the map the insert the information into. * @param doc the doc whose type parameters are being checked. * @param holder the holder that owns the type parameters. */ private <T extends PackageDoc> void mapAnnotations(Map<String,List<T>> map, PackageDoc doc, T holder) { AnnotationDesc[] annotations; annotations = doc.annotations(); for (int i = 0; i < annotations.length; i++) { AnnotationTypeDoc annotationDoc = annotations[i].annotationType(); refList(map, annotationDoc).add(holder); } }
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
/** * Return true if the given Doc is deprecated. * * @param doc the Doc to check. * @return true if the given Doc is deprecated. */ public static boolean isDeprecated(Doc doc) { if (doc.tags("deprecated").length > 0) { return true; } AnnotationDesc[] annotationDescList; if (doc instanceof PackageDoc) annotationDescList = ((PackageDoc)doc).annotations(); else annotationDescList = ((ProgramElementDoc)doc).annotations(); for (int i = 0; i < annotationDescList.length; i++) { if (annotationDescList[i].annotationType().qualifiedName().equals( java.lang.Deprecated.class.getName())){ return true; } } return false; }
annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations();
/** * Map the AnnotationType to the ProgramElementDocs that use them as * type parameters. * * @param map the map the insert the information into. * @param doc the doc whose type parameters are being checked. * @param holder the holder that owns the type parameters. */ private <T extends ProgramElementDoc> void mapAnnotations(Map<String,List<T>> map, Object doc, T holder) { AnnotationDesc[] annotations; boolean isPackage = false; if (doc instanceof ProgramElementDoc) { annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations(); isPackage = true; } else if (doc instanceof Parameter) { annotations = ((Parameter) doc).annotations(); } else { throw new DocletAbortException("should not happen"); } for (int i = 0; i < annotations.length; i++) { AnnotationTypeDoc annotationDoc = annotations[i].annotationType(); if (isPackage) refList(map, annotationDoc).add(holder); else add(map, annotationDoc, holder); } }
/** * Map the AnnotationType to the ProgramElementDocs that use them as * type parameters. * * @param map the map the insert the information into. * @param doc the doc whose type parameters are being checked. * @param holder the holder that owns the type parameters. */ private <T extends ProgramElementDoc> void mapAnnotations(Map<String,List<T>> map, Object doc, T holder) { AnnotationDesc[] annotations; boolean isPackage = false; if (doc instanceof ProgramElementDoc) { annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations(); isPackage = true; } else if (doc instanceof Parameter) { annotations = ((Parameter) doc).annotations(); } else { throw new DocletAbortException(); } for (int i = 0; i < annotations.length; i++) { AnnotationTypeDoc annotationDoc = annotations[i].annotationType(); if (isPackage) refList(map, annotationDoc).add(holder); else add(map, annotationDoc, holder); } }