Tue, 14 May 2013 10:14:51 -0700
8010440: Replace int constants in LinkInfoImpl with enum
Reviewed-by: bpatel, darcy
1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java Fri May 10 15:15:50 2013 +0200 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java Tue May 14 10:14:51 2013 -0700 1.3 @@ -62,7 +62,7 @@ 1.4 */ 1.5 protected int addTypeParameters(ExecutableMemberDoc member, Content htmltree) { 1.6 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 1.7 - LinkInfoImpl.CONTEXT_MEMBER_TYPE_PARAMS, member, false); 1.8 + LinkInfoImpl.Kind.MEMBER_TYPE_PARAMS, member, false); 1.9 String typeParameters = writer.getTypeParameterLinks(linkInfo); 1.10 if (linkInfo.displayLength > 0) { 1.11 Content linkContent = new RawHtml(typeParameters); 1.12 @@ -78,7 +78,7 @@ 1.13 */ 1.14 protected Content getDeprecatedLink(ProgramElementDoc member) { 1.15 ExecutableMemberDoc emd = (ExecutableMemberDoc)member; 1.16 - return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, (MemberDoc) emd, 1.17 + return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, (MemberDoc) emd, 1.18 emd.qualifiedName() + emd.flatSignature()); 1.19 } 1.20 1.21 @@ -90,7 +90,7 @@ 1.22 * @param member the member being linked to 1.23 * @param tdSummary the content tree to which the link will be added 1.24 */ 1.25 - protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 1.26 + protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, 1.27 Content tdSummary) { 1.28 ExecutableMemberDoc emd = (ExecutableMemberDoc)member; 1.29 String name = emd.name(); 1.30 @@ -113,7 +113,7 @@ 1.31 protected void addInheritedSummaryLink(ClassDoc cd, 1.32 ProgramElementDoc member, Content linksTree) { 1.33 linksTree.addContent(new RawHtml( 1.34 - writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, cd, (MemberDoc) member, 1.35 + writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc) member, 1.36 member.name(), false))); 1.37 } 1.38 1.39 @@ -129,7 +129,7 @@ 1.40 boolean isVarArg, Content tree) { 1.41 if (param.type() != null) { 1.42 Content link = new RawHtml(writer.getLink(new LinkInfoImpl( 1.43 - configuration, LinkInfoImpl.CONTEXT_EXECUTABLE_MEMBER_PARAM, 1.44 + configuration, LinkInfoImpl.Kind.EXECUTABLE_MEMBER_PARAM, 1.45 param.type(), isVarArg))); 1.46 tree.addContent(link); 1.47 } 1.48 @@ -153,7 +153,7 @@ 1.49 tree.addContent(writer.getSpace()); 1.50 tree.addContent(rcvrType.typeName()); 1.51 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 1.52 - LinkInfoImpl.CONTEXT_CLASS_SIGNATURE, rcvrType); 1.53 + LinkInfoImpl.Kind.CLASS_SIGNATURE, rcvrType); 1.54 tree.addContent(new RawHtml(writer.getTypeParameterLinks(linkInfo))); 1.55 tree.addContent(writer.getSpace()); 1.56 tree.addContent("this"); 1.57 @@ -244,7 +244,7 @@ 1.58 Type[] exceptions = member.thrownExceptionTypes(); 1.59 if(exceptions.length > 0) { 1.60 LinkInfoImpl memberTypeParam = new LinkInfoImpl(configuration, 1.61 - LinkInfoImpl.CONTEXT_MEMBER, member, false); 1.62 + LinkInfoImpl.Kind.MEMBER, member, false); 1.63 int retlen = getReturnTypeLength(member); 1.64 writer.getTypeParameterLinks(memberTypeParam); 1.65 retlen += memberTypeParam.displayLength == 0 ? 1.66 @@ -256,14 +256,14 @@ 1.67 htmltree.addContent("throws "); 1.68 indent += " "; 1.69 Content link = new RawHtml(writer.getLink(new LinkInfoImpl(configuration, 1.70 - LinkInfoImpl.CONTEXT_MEMBER, exceptions[0]))); 1.71 + LinkInfoImpl.Kind.MEMBER, exceptions[0]))); 1.72 htmltree.addContent(link); 1.73 for(int i = 1; i < exceptions.length; i++) { 1.74 htmltree.addContent(","); 1.75 htmltree.addContent(DocletConstants.NL); 1.76 htmltree.addContent(indent); 1.77 Content exceptionLink = new RawHtml(writer.getLink(new LinkInfoImpl( 1.78 - configuration, LinkInfoImpl.CONTEXT_MEMBER, exceptions[i]))); 1.79 + configuration, LinkInfoImpl.Kind.MEMBER, exceptions[i]))); 1.80 htmltree.addContent(exceptionLink); 1.81 } 1.82 } 1.83 @@ -278,7 +278,7 @@ 1.84 rettype.dimension().length(); 1.85 } else { 1.86 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 1.87 - LinkInfoImpl.CONTEXT_MEMBER, rettype); 1.88 + LinkInfoImpl.Kind.MEMBER, rettype); 1.89 writer.getLink(linkInfo); 1.90 return linkInfo.displayLength; 1.91 }
2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Fri May 10 15:15:50 2013 +0200 2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Tue May 14 10:14:51 2013 -0700 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 2.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 * 2.9 * This code is free software; you can redistribute it and/or modify it 2.10 @@ -141,7 +141,7 @@ 2.11 protected void addDescription(ClassDoc cd, Content dlTree) { 2.12 Content link = new RawHtml( 2.13 getLink(new LinkInfoImpl(configuration, 2.14 - LinkInfoImpl.CONTEXT_INDEX, cd, true))); 2.15 + LinkInfoImpl.Kind.INDEX, cd, true))); 2.16 Content dt = HtmlTree.DT(link); 2.17 dt.addContent(" - "); 2.18 addClassInfo(cd, dt); 2.19 @@ -152,7 +152,7 @@ 2.20 } 2.21 2.22 /** 2.23 - * Add the classkind(class, interface, exception, error of the class 2.24 + * Add the classkind (class, interface, exception), error of the class 2.25 * passed. 2.26 * 2.27 * @param cd the class being documented 2.28 @@ -179,7 +179,7 @@ 2.29 name = Util.escapeHtmlChars(name); 2.30 } 2.31 Content span = HtmlTree.SPAN(HtmlStyle.strong, 2.32 - getDocLink(LinkInfoImpl.CONTEXT_INDEX, member, name)); 2.33 + getDocLink(LinkInfoImpl.Kind.INDEX, member, name)); 2.34 Content dt = HtmlTree.DT(span); 2.35 dt.addContent(" - "); 2.36 addMemberDesc(member, dt); 2.37 @@ -253,7 +253,7 @@ 2.38 getResource("doclet.Method_in", classdesc)); 2.39 } 2.40 } 2.41 - addPreQualifiedClassLink(LinkInfoImpl.CONTEXT_INDEX, containing, 2.42 + addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing, 2.43 false, contentTree); 2.44 } 2.45 }
3.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Fri May 10 15:15:50 2013 +0200 3.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Tue May 14 10:14:51 2013 -0700 3.3 @@ -1,5 +1,5 @@ 3.4 /* 3.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 3.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 3.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3.8 * 3.9 * This code is free software; you can redistribute it and/or modify it 3.10 @@ -143,7 +143,7 @@ 3.11 */ 3.12 protected void addSummaryLink(ClassDoc cd, ProgramElementDoc member, 3.13 Content tdSummary) { 3.14 - addSummaryLink(LinkInfoImpl.CONTEXT_MEMBER, cd, member, tdSummary); 3.15 + addSummaryLink(LinkInfoImpl.Kind.MEMBER, cd, member, tdSummary); 3.16 } 3.17 3.18 /** 3.19 @@ -154,7 +154,7 @@ 3.20 * @param member the member to be documented 3.21 * @param tdSummary the content tree to which the summary link will be added 3.22 */ 3.23 - protected abstract void addSummaryLink(int context, 3.24 + protected abstract void addSummaryLink(LinkInfoImpl.Kind context, 3.25 ClassDoc cd, ProgramElementDoc member, Content tdSummary); 3.26 3.27 /** 3.28 @@ -294,11 +294,11 @@ 3.29 } 3.30 code.addContent(new RawHtml( 3.31 writer.getLink(new LinkInfoImpl(configuration, 3.32 - LinkInfoImpl.CONTEXT_SUMMARY_RETURN_TYPE, type)))); 3.33 + LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type)))); 3.34 } else { 3.35 code.addContent(new RawHtml( 3.36 writer.getLink(new LinkInfoImpl(configuration, 3.37 - LinkInfoImpl.CONTEXT_SUMMARY_RETURN_TYPE, type)))); 3.38 + LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type)))); 3.39 } 3.40 3.41 } 3.42 @@ -483,7 +483,7 @@ 3.43 tdLast.addContent(name); 3.44 } 3.45 addSummaryLink(pgmdoc instanceof ClassDoc ? 3.46 - LinkInfoImpl.CONTEXT_CLASS_USE : LinkInfoImpl.CONTEXT_MEMBER, 3.47 + LinkInfoImpl.Kind.CLASS_USE : LinkInfoImpl.Kind.MEMBER, 3.48 cd, pgmdoc, tdLast); 3.49 writer.addSummaryLinkComment(this, pgmdoc, tdLast); 3.50 tr.addContent(tdLast);
4.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java Fri May 10 15:15:50 2013 +0200 4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java Tue May 14 10:14:51 2013 -0700 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -152,7 +152,7 @@ 4.11 } else { 4.12 contentTree.addContent(", "); 4.13 } 4.14 - addPreQualifiedClassLink(LinkInfoImpl.CONTEXT_TREE, 4.15 + addPreQualifiedClassLink(LinkInfoImpl.Kind.TREE, 4.16 interfaces[i], contentTree); 4.17 counter++; 4.18 } 4.19 @@ -170,7 +170,7 @@ 4.20 * @param contentTree the content tree to which the information will be added 4.21 */ 4.22 protected void addPartialInfo(ClassDoc cd, Content contentTree) { 4.23 - addPreQualifiedStrongClassLink(LinkInfoImpl.CONTEXT_TREE, cd, contentTree); 4.24 + addPreQualifiedStrongClassLink(LinkInfoImpl.Kind.TREE, cd, contentTree); 4.25 } 4.26 4.27 /**
5.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java Fri May 10 15:15:50 2013 +0200 5.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java Tue May 14 10:14:51 2013 -0700 5.3 @@ -1,5 +1,5 @@ 5.4 /* 5.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 5.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 5.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.8 * 5.9 * This code is free software; you can redistribute it and/or modify it 5.10 @@ -160,7 +160,7 @@ 5.11 Content linkContent; 5.12 if(wantFrames){ 5.13 linkContent = new RawHtml(getLink(new LinkInfoImpl(configuration, 5.14 - LinkInfoImpl.ALL_CLASSES_FRAME, cd, label, "classFrame"))); 5.15 + LinkInfoImpl.Kind.ALL_CLASSES_FRAME, cd, label, "classFrame"))); 5.16 } else { 5.17 linkContent = new RawHtml(getLink(new LinkInfoImpl( 5.18 configuration, cd, label)));
6.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Fri May 10 15:15:50 2013 +0200 6.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Tue May 14 10:14:51 2013 -0700 6.3 @@ -1,5 +1,5 @@ 6.4 /* 6.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 6.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 6.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 6.8 * 6.9 * This code is free software; you can redistribute it and/or modify it 6.10 @@ -107,7 +107,7 @@ 6.11 addModifiers(member, pre); 6.12 Content link = new RawHtml( 6.13 writer.getLink(new LinkInfoImpl(configuration, 6.14 - LinkInfoImpl.CONTEXT_MEMBER, getType(member)))); 6.15 + LinkInfoImpl.Kind.MEMBER, getType(member)))); 6.16 pre.addContent(link); 6.17 pre.addContent(writer.getSpace()); 6.18 if (configuration.linksource) { 6.19 @@ -223,7 +223,7 @@ 6.20 /** 6.21 * {@inheritDoc} 6.22 */ 6.23 - protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 6.24 + protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, 6.25 Content tdSummary) { 6.26 Content strong = HtmlTree.STRONG(new RawHtml( 6.27 writer.getDocLink(context, (MemberDoc) member, member.name(), false))); 6.28 @@ -251,7 +251,7 @@ 6.29 * {@inheritDoc} 6.30 */ 6.31 protected Content getDeprecatedLink(ProgramElementDoc member) { 6.32 - return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, 6.33 + return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, 6.34 (MemberDoc) member, ((MemberDoc)member).qualifiedName()); 6.35 } 6.36
7.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Fri May 10 15:15:50 2013 +0200 7.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Tue May 14 10:14:51 2013 -0700 7.3 @@ -1,5 +1,5 @@ 7.4 /* 7.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 7.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 7.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 7.8 * 7.9 * This code is free software; you can redistribute it and/or modify it 7.10 @@ -117,7 +117,7 @@ 7.11 Content li; 7.12 if (prev != null) { 7.13 Content prevLink = new RawHtml(getLink(new LinkInfoImpl(configuration, 7.14 - LinkInfoImpl.CONTEXT_CLASS, prev.asClassDoc(), "", 7.15 + LinkInfoImpl.Kind.CLASS, prev.asClassDoc(), "", 7.16 configuration.getText("doclet.Prev_Class"), true))); 7.17 li = HtmlTree.LI(prevLink); 7.18 } 7.19 @@ -135,7 +135,7 @@ 7.20 Content li; 7.21 if (next != null) { 7.22 Content nextLink = new RawHtml(getLink(new LinkInfoImpl(configuration, 7.23 - LinkInfoImpl.CONTEXT_CLASS, next.asClassDoc(), "", 7.24 + LinkInfoImpl.Kind.CLASS, next.asClassDoc(), "", 7.25 configuration.getText("doclet.Next_Class"), true))); 7.26 li = HtmlTree.LI(nextLink); 7.27 } 7.28 @@ -163,7 +163,7 @@ 7.29 div.addContent(pkgNameDiv); 7.30 } 7.31 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 7.32 - LinkInfoImpl.CONTEXT_CLASS_HEADER, annotationType, false); 7.33 + LinkInfoImpl.Kind.CLASS_HEADER, annotationType, false); 7.34 Content headerContent = new StringContent(header); 7.35 Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true, 7.36 HtmlStyle.title, headerContent); 7.37 @@ -220,7 +220,7 @@ 7.38 addAnnotationInfo(annotationType, pre); 7.39 pre.addContent(modifiers); 7.40 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 7.41 - LinkInfoImpl.CONTEXT_CLASS_SIGNATURE, annotationType, false); 7.42 + LinkInfoImpl.Kind.CLASS_SIGNATURE, annotationType, false); 7.43 Content annotationName = new StringContent(annotationType.name()); 7.44 Content parameterLinks = new RawHtml(getTypeParameterLinks(linkInfo)); 7.45 if (configuration.linksource) {
8.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Fri May 10 15:15:50 2013 +0200 8.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Tue May 14 10:14:51 2013 -0700 8.3 @@ -1,5 +1,5 @@ 8.4 /* 8.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 8.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 8.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8.8 * 8.9 * This code is free software; you can redistribute it and/or modify it 8.10 @@ -258,7 +258,7 @@ 8.11 Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, 8.12 getTableCaption(configuration.getText( 8.13 "doclet.ClassUse_Packages.that.use.0", 8.14 - getLink(new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, 8.15 + getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc, 8.16 false))))); 8.17 table.addContent(getSummaryTableHeader(packageTableHeader, "col")); 8.18 Content tbody = new HtmlTree(HtmlTag.TBODY); 8.19 @@ -294,7 +294,7 @@ 8.20 getTableCaption(configuration.getText( 8.21 "doclet.ClassUse_PackageAnnotation", 8.22 getLink(new LinkInfoImpl(configuration, 8.23 - LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false))))); 8.24 + LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc, false))))); 8.25 table.addContent(getSummaryTableHeader(packageTableHeader, "col")); 8.26 Content tbody = new HtmlTree(HtmlTag.TBODY); 8.27 Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator(); 8.28 @@ -333,7 +333,7 @@ 8.29 Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name())); 8.30 Content link = new RawHtml( 8.31 configuration.getText("doclet.ClassUse_Uses.of.0.in.1", 8.32 - getLink(new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, 8.33 + getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, 8.34 classdoc, false)), 8.35 getPackageLinkString(pkg, Util.getPackageName(pkg), false))); 8.36 Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link); 8.37 @@ -369,7 +369,7 @@ 8.38 */ 8.39 protected void addClassUse(PackageDoc pkg, Content contentTree) throws IOException { 8.40 String classLink = getLink(new LinkInfoImpl(configuration, 8.41 - LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false)); 8.42 + LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc, false)); 8.43 String pkgLink = getPackageLinkString(pkg, Util.getPackageName(pkg), false); 8.44 classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg.name()), 8.45 configuration.getText("doclet.ClassUse_Annotation", classLink, 8.46 @@ -477,7 +477,7 @@ 8.47 */ 8.48 protected Content getNavLinkClass() { 8.49 Content linkContent = new RawHtml(getLink(new LinkInfoImpl( 8.50 - configuration, LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, 8.51 + configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc, 8.52 "", configuration.getText("doclet.Class"), false))); 8.53 Content li = HtmlTree.LI(linkContent); 8.54 return li;
9.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Fri May 10 15:15:50 2013 +0200 9.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Tue May 14 10:14:51 2013 -0700 9.3 @@ -125,7 +125,7 @@ 9.4 Content li; 9.5 if (prev != null) { 9.6 Content prevLink = new RawHtml(getLink(new LinkInfoImpl(configuration, 9.7 - LinkInfoImpl.CONTEXT_CLASS, prev, "", 9.8 + LinkInfoImpl.Kind.CLASS, prev, "", 9.9 configuration.getText("doclet.Prev_Class"), true))); 9.10 li = HtmlTree.LI(prevLink); 9.11 } 9.12 @@ -143,7 +143,7 @@ 9.13 Content li; 9.14 if (next != null) { 9.15 Content nextLink = new RawHtml(getLink(new LinkInfoImpl(configuration, 9.16 - LinkInfoImpl.CONTEXT_CLASS, next, "", 9.17 + LinkInfoImpl.Kind.CLASS, next, "", 9.18 configuration.getText("doclet.Next_Class"), true))); 9.19 li = HtmlTree.LI(nextLink); 9.20 } 9.21 @@ -185,7 +185,7 @@ 9.22 div.addContent(pkgNameDiv); 9.23 } 9.24 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 9.25 - LinkInfoImpl.CONTEXT_CLASS_HEADER, classDoc, false); 9.26 + LinkInfoImpl.Kind.CLASS_HEADER, classDoc, false); 9.27 //Let's not link to ourselves in the header. 9.28 linkInfo.linkToSelf = false; 9.29 Content headerContent = new StringContent(header); 9.30 @@ -245,7 +245,7 @@ 9.31 addAnnotationInfo(classDoc, pre); 9.32 pre.addContent(modifiers); 9.33 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 9.34 - LinkInfoImpl.CONTEXT_CLASS_SIGNATURE, classDoc, false); 9.35 + LinkInfoImpl.Kind.CLASS_SIGNATURE, classDoc, false); 9.36 //Let's not link to ourselves in the signature. 9.37 linkInfo.linkToSelf = false; 9.38 Content className = new StringContent(classDoc.name()); 9.39 @@ -265,7 +265,7 @@ 9.40 pre.addContent(DocletConstants.NL); 9.41 pre.addContent("extends "); 9.42 Content link = new RawHtml(getLink(new LinkInfoImpl(configuration, 9.43 - LinkInfoImpl.CONTEXT_CLASS_SIGNATURE_PARENT_NAME, 9.44 + LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME, 9.45 superclass))); 9.46 pre.addContent(link); 9.47 } 9.48 @@ -286,7 +286,7 @@ 9.49 pre.addContent(", "); 9.50 } 9.51 Content link = new RawHtml(getLink(new LinkInfoImpl(configuration, 9.52 - LinkInfoImpl.CONTEXT_CLASS_SIGNATURE_PARENT_NAME, 9.53 + LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME, 9.54 implIntfacs[i]))); 9.55 pre.addContent(link); 9.56 counter++; 9.57 @@ -361,7 +361,7 @@ 9.58 Content li = new HtmlTree(HtmlTag.LI); 9.59 if (type.equals(classDoc)) { 9.60 String typeParameters = getTypeParameterLinks( 9.61 - new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_TREE, 9.62 + new LinkInfoImpl(configuration, LinkInfoImpl.Kind.TREE, 9.63 classDoc, false)); 9.64 if (configuration.shouldExcludeQualifier( 9.65 classDoc.containingPackage().name())) { 9.66 @@ -373,7 +373,7 @@ 9.67 } 9.68 } else { 9.69 Content link = new RawHtml(getLink(new LinkInfoImpl(configuration, 9.70 - LinkInfoImpl.CONTEXT_CLASS_TREE_PARENT, 9.71 + LinkInfoImpl.Kind.CLASS_TREE_PARENT, 9.72 type instanceof ClassDoc ? (ClassDoc) type : type, 9.73 configuration.getClassName(type.asClassDoc()), false))); 9.74 li.addContent(link); 9.75 @@ -419,7 +419,7 @@ 9.76 "doclet.Subclasses"); 9.77 Content dt = HtmlTree.DT(label); 9.78 Content dl = HtmlTree.DL(dt); 9.79 - dl.addContent(getClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES, 9.80 + dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBCLASSES, 9.81 subclasses)); 9.82 classInfoTree.addContent(dl); 9.83 } 9.84 @@ -437,7 +437,7 @@ 9.85 "doclet.Subinterfaces"); 9.86 Content dt = HtmlTree.DT(label); 9.87 Content dl = HtmlTree.DL(dt); 9.88 - dl.addContent(getClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES, 9.89 + dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBINTERFACES, 9.90 subInterfaces)); 9.91 classInfoTree.addContent(dl); 9.92 } 9.93 @@ -461,7 +461,7 @@ 9.94 "doclet.Implementing_Classes"); 9.95 Content dt = HtmlTree.DT(label); 9.96 Content dl = HtmlTree.DL(dt); 9.97 - dl.addContent(getClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES, 9.98 + dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_CLASSES, 9.99 implcl)); 9.100 classInfoTree.addContent(dl); 9.101 } 9.102 @@ -479,7 +479,7 @@ 9.103 "doclet.All_Implemented_Interfaces"); 9.104 Content dt = HtmlTree.DT(label); 9.105 Content dl = HtmlTree.DL(dt); 9.106 - dl.addContent(getClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES, 9.107 + dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_INTERFACES, 9.108 interfaceArray)); 9.109 classInfoTree.addContent(dl); 9.110 } 9.111 @@ -497,7 +497,7 @@ 9.112 "doclet.All_Superinterfaces"); 9.113 Content dt = HtmlTree.DT(label); 9.114 Content dl = HtmlTree.DL(dt); 9.115 - dl.addContent(getClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES, 9.116 + dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUPER_INTERFACES, 9.117 interfaceArray)); 9.118 classInfoTree.addContent(dl); 9.119 } 9.120 @@ -521,7 +521,7 @@ 9.121 Content dl = HtmlTree.DL(dt); 9.122 Content dd = new HtmlTree(HtmlTag.DD); 9.123 dd.addContent(new RawHtml(getLink(new LinkInfoImpl(configuration, 9.124 - LinkInfoImpl.CONTEXT_CLASS, outerClass, false)))); 9.125 + LinkInfoImpl.Kind.CLASS, outerClass, false)))); 9.126 dl.addContent(dd); 9.127 classInfoTree.addContent(dl); 9.128 } 9.129 @@ -569,7 +569,7 @@ 9.130 * @param list the list of classes 9.131 * @return a content tree for the class list 9.132 */ 9.133 - private Content getClassLinks(int context, List<?> list) { 9.134 + private Content getClassLinks(LinkInfoImpl.Kind context, List<?> list) { 9.135 Object[] typeList = list.toArray(); 9.136 Content dd = new HtmlTree(HtmlTag.DD); 9.137 for (int i = 0; i < list.size(); i++) {
10.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java Fri May 10 15:15:50 2013 +0200 10.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java Tue May 14 10:14:51 2013 -0700 10.3 @@ -1,5 +1,5 @@ 10.4 /* 10.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 10.6 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 10.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.8 * 10.9 * This code is free software; you can redistribute it and/or modify it 10.10 @@ -186,7 +186,7 @@ 10.11 //generate links backward only to public classes. 10.12 String classlink = (cd.isPublic() || cd.isProtected()) ? 10.13 getLink(new LinkInfoImpl(configuration, 10.14 - LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, cd, false)) : 10.15 + LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd, false)) : 10.16 cd.qualifiedName(); 10.17 String name = cd.containingPackage().name(); 10.18 if (name.length() > 0) { 10.19 @@ -261,7 +261,7 @@ 10.20 code.addContent(getSpace()); 10.21 } 10.22 Content type = new RawHtml(getLink(new LinkInfoImpl(configuration, 10.23 - LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, member.type()))); 10.24 + LinkInfoImpl.Kind.CONSTANT_SUMMARY, member.type()))); 10.25 code.addContent(type); 10.26 tdType.addContent(code); 10.27 return tdType; 10.28 @@ -275,7 +275,7 @@ 10.29 */ 10.30 private Content getNameColumn(FieldDoc member) { 10.31 Content nameContent = new RawHtml(getDocLink( 10.32 - LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, member, member.name(), false)); 10.33 + LinkInfoImpl.Kind.CONSTANT_SUMMARY, member, member.name(), false)); 10.34 Content code = HtmlTree.CODE(nameContent); 10.35 return HtmlTree.TD(code); 10.36 }
11.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Fri May 10 15:15:50 2013 +0200 11.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Tue May 14 10:14:51 2013 -0700 11.3 @@ -1,5 +1,5 @@ 11.4 /* 11.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 11.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 11.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.8 * 11.9 * This code is free software; you can redistribute it and/or modify it 11.10 @@ -102,7 +102,7 @@ 11.11 writer.addAnnotationInfo(enumConstant, pre); 11.12 addModifiers(enumConstant, pre); 11.13 Content enumConstantLink = new RawHtml(writer.getLink(new LinkInfoImpl( 11.14 - configuration, LinkInfoImpl.CONTEXT_MEMBER, enumConstant.type()))); 11.15 + configuration, LinkInfoImpl.Kind.MEMBER, enumConstant.type()))); 11.16 pre.addContent(enumConstantLink); 11.17 pre.addContent(" "); 11.18 if (configuration.linksource) { 11.19 @@ -220,7 +220,7 @@ 11.20 /** 11.21 * {@inheritDoc} 11.22 */ 11.23 - protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 11.24 + protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, 11.25 Content tdSummary) { 11.26 Content strong = HtmlTree.STRONG(new RawHtml( 11.27 writer.getDocLink(context, (MemberDoc) member, member.name(), false))); 11.28 @@ -254,7 +254,7 @@ 11.29 * {@inheritDoc} 11.30 */ 11.31 protected Content getDeprecatedLink(ProgramElementDoc member) { 11.32 - return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, 11.33 + return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, 11.34 (MemberDoc) member, ((FieldDoc)member).qualifiedName()); 11.35 } 11.36
12.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Fri May 10 15:15:50 2013 +0200 12.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Tue May 14 10:14:51 2013 -0700 12.3 @@ -1,5 +1,5 @@ 12.4 /* 12.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 12.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 12.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 12.8 * 12.9 * This code is free software; you can redistribute it and/or modify it 12.10 @@ -103,7 +103,7 @@ 12.11 writer.addAnnotationInfo(field, pre); 12.12 addModifiers(field, pre); 12.13 Content fieldlink = new RawHtml(writer.getLink(new LinkInfoImpl( 12.14 - configuration, LinkInfoImpl.CONTEXT_MEMBER, field.type()))); 12.15 + configuration, LinkInfoImpl.Kind.MEMBER, field.type()))); 12.16 pre.addContent(fieldlink); 12.17 pre.addContent(" "); 12.18 if (configuration.linksource) { 12.19 @@ -133,7 +133,7 @@ 12.20 writer.addInlineComment(field, fieldDocTree); 12.21 } else { 12.22 Content link = new RawHtml( 12.23 - writer.getDocLink(LinkInfoImpl.CONTEXT_FIELD_DOC_COPY, 12.24 + writer.getDocLink(LinkInfoImpl.Kind.FIELD_DOC_COPY, 12.25 holder, field, 12.26 holder.isIncluded() ? 12.27 holder.typeName() : holder.qualifiedTypeName(), 12.28 @@ -240,7 +240,7 @@ 12.29 */ 12.30 public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { 12.31 Content classLink = new RawHtml(writer.getPreQualifiedClassLink( 12.32 - LinkInfoImpl.CONTEXT_MEMBER, cd, false)); 12.33 + LinkInfoImpl.Kind.MEMBER, cd, false)); 12.34 Content label = new StringContent(cd.isClass() ? 12.35 configuration.getText("doclet.Fields_Inherited_From_Class") : 12.36 configuration.getText("doclet.Fields_Inherited_From_Interface")); 12.37 @@ -254,7 +254,7 @@ 12.38 /** 12.39 * {@inheritDoc} 12.40 */ 12.41 - protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 12.42 + protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, 12.43 Content tdSummary) { 12.44 Content strong = HtmlTree.STRONG(new RawHtml( 12.45 writer.getDocLink(context, cd , (MemberDoc) member, member.name(), false))); 12.46 @@ -268,7 +268,7 @@ 12.47 protected void addInheritedSummaryLink(ClassDoc cd, 12.48 ProgramElementDoc member, Content linksTree) { 12.49 linksTree.addContent(new RawHtml( 12.50 - writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, cd, (MemberDoc)member, 12.51 + writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc)member, 12.52 member.name(), false))); 12.53 } 12.54 12.55 @@ -284,7 +284,7 @@ 12.56 * {@inheritDoc} 12.57 */ 12.58 protected Content getDeprecatedLink(ProgramElementDoc member) { 12.59 - return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, 12.60 + return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, 12.61 (MemberDoc) member, ((FieldDoc)member).qualifiedName()); 12.62 } 12.63
13.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Fri May 10 15:15:50 2013 +0200 13.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Tue May 14 10:14:51 2013 -0700 13.3 @@ -373,7 +373,7 @@ 13.4 continue; 13.5 } 13.6 Content classContent = new RawHtml(getLink(new LinkInfoImpl( 13.7 - configuration, LinkInfoImpl.CONTEXT_PACKAGE, classes[i], 13.8 + configuration, LinkInfoImpl.Kind.PACKAGE, classes[i], 13.9 false))); 13.10 Content tdClass = HtmlTree.TD(HtmlStyle.colFirst, classContent); 13.11 HtmlTree tr = HtmlTree.TR(tdClass); 13.12 @@ -1191,7 +1191,7 @@ 13.13 * @param cd the class doc to link to 13.14 * @return a content tree for the link 13.15 */ 13.16 - public Content getQualifiedClassLink(int context, ClassDoc cd) { 13.17 + public Content getQualifiedClassLink(LinkInfoImpl.Kind context, ClassDoc cd) { 13.18 return new RawHtml(getLink(new LinkInfoImpl(configuration, context, cd, 13.19 configuration.getClassName(cd), ""))); 13.20 } 13.21 @@ -1203,7 +1203,7 @@ 13.22 * @param cd the class doc to link to 13.23 * @param contentTree the content tree to which the link will be added 13.24 */ 13.25 - public void addPreQualifiedClassLink(int context, ClassDoc cd, Content contentTree) { 13.26 + public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, ClassDoc cd, Content contentTree) { 13.27 addPreQualifiedClassLink(context, cd, false, contentTree); 13.28 } 13.29 13.30 @@ -1216,7 +1216,7 @@ 13.31 * @param isStrong true if the link should be strong. 13.32 * @return the link with the package portion of the label in plain text. 13.33 */ 13.34 - public String getPreQualifiedClassLink(int context, 13.35 + public String getPreQualifiedClassLink(LinkInfoImpl.Kind context, 13.36 ClassDoc cd, boolean isStrong) { 13.37 String classlink = ""; 13.38 PackageDoc pd = cd.containingPackage(); 13.39 @@ -1238,7 +1238,7 @@ 13.40 * @param isStrong true if the link should be strong 13.41 * @param contentTree the content tree to which the link with be added 13.42 */ 13.43 - public void addPreQualifiedClassLink(int context, 13.44 + public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, 13.45 ClassDoc cd, boolean isStrong, Content contentTree) { 13.46 PackageDoc pd = cd.containingPackage(); 13.47 if(pd != null && ! configuration.shouldExcludeQualifier(pd.name())) { 13.48 @@ -1256,7 +1256,7 @@ 13.49 * @param cd the class to link to 13.50 * @param contentTree the content tree to which the link with be added 13.51 */ 13.52 - public void addPreQualifiedStrongClassLink(int context, ClassDoc cd, Content contentTree) { 13.53 + public void addPreQualifiedStrongClassLink(LinkInfoImpl.Kind context, ClassDoc cd, Content contentTree) { 13.54 addPreQualifiedClassLink(context, cd, true, contentTree); 13.55 } 13.56 13.57 @@ -1268,7 +1268,7 @@ 13.58 * @param label the label for the link 13.59 * @return a content tree for the doc link 13.60 */ 13.61 - public Content getDocLink(int context, MemberDoc doc, String label) { 13.62 + public Content getDocLink(LinkInfoImpl.Kind context, MemberDoc doc, String label) { 13.63 return getDocLink(context, doc.containingClass(), doc, label); 13.64 } 13.65 13.66 @@ -1281,7 +1281,7 @@ 13.67 * @param strong true if the link should be strong. 13.68 * @return the link for the given member. 13.69 */ 13.70 - public String getDocLink(int context, MemberDoc doc, String label, 13.71 + public String getDocLink(LinkInfoImpl.Kind context, MemberDoc doc, String label, 13.72 boolean strong) { 13.73 return getDocLink(context, doc.containingClass(), doc, label, strong); 13.74 } 13.75 @@ -1298,7 +1298,7 @@ 13.76 * @param strong true if the link should be strong. 13.77 * @return the link for the given member. 13.78 */ 13.79 - public String getDocLink(int context, ClassDoc classDoc, MemberDoc doc, 13.80 + public String getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, 13.81 String label, boolean strong) { 13.82 return getDocLink(context, classDoc, doc, label, strong, false); 13.83 } 13.84 @@ -1316,7 +1316,7 @@ 13.85 * @param isProperty true if the doc parameter is a JavaFX property. 13.86 * @return the link for the given member. 13.87 */ 13.88 - public String getDocLink(int context, ClassDoc classDoc, MemberDoc doc, 13.89 + public String getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, 13.90 String label, boolean strong, boolean isProperty) { 13.91 if (! (doc.isIncluded() || 13.92 Util.isLinkable(classDoc, configuration))) { 13.93 @@ -1344,7 +1344,7 @@ 13.94 * @param label the label for the link 13.95 * @return the link for the given member 13.96 */ 13.97 - public Content getDocLink(int context, ClassDoc classDoc, MemberDoc doc, 13.98 + public Content getDocLink(LinkInfoImpl.Kind context, ClassDoc classDoc, MemberDoc doc, 13.99 String label) { 13.100 if (! (doc.isIncluded() || 13.101 Util.isLinkable(classDoc, configuration))) { 13.102 @@ -1480,7 +1480,7 @@ 13.103 13.104 text = plainOrCodeText(plain, Util.escapeHtmlChars(refMemName)); 13.105 13.106 - return getDocLink(LinkInfoImpl.CONTEXT_SEE_TAG, containing, 13.107 + return getDocLink(LinkInfoImpl.Kind.SEE_TAG, containing, 13.108 refMem, (label.isEmpty() ? text: label), false); 13.109 } 13.110 } 13.111 @@ -1998,7 +1998,7 @@ 13.112 annotation = new StringBuilder(); 13.113 isAnnotationDocumented = false; 13.114 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 13.115 - LinkInfoImpl.CONTEXT_ANNOTATION, annotationDoc); 13.116 + LinkInfoImpl.Kind.ANNOTATION, annotationDoc); 13.117 AnnotationDesc.ElementValuePair[] pairs = descList[i].elementValues(); 13.118 // If the annotation is synthesized, do not print the container. 13.119 if (descList[i].isSynthesized()) { 13.120 @@ -2081,7 +2081,7 @@ 13.121 } 13.122 } 13.123 } 13.124 - annotation.append(getDocLink(LinkInfoImpl.CONTEXT_ANNOTATION, 13.125 + annotation.append(getDocLink(LinkInfoImpl.Kind.ANNOTATION, 13.126 pairs[j].element(), pairs[j].element().name(), false)); 13.127 annotation.append('='); 13.128 AnnotationValue annotationValue = pairs[j].value(); 13.129 @@ -2143,7 +2143,7 @@ 13.130 Type type = (Type) annotationValue.value(); 13.131 if (type.asClassDoc() != null) { 13.132 LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, 13.133 - LinkInfoImpl.CONTEXT_ANNOTATION, type); 13.134 + LinkInfoImpl.Kind.ANNOTATION, type); 13.135 linkInfo.label = (type.asClassDoc().isIncluded() ? 13.136 type.typeName() : 13.137 type.qualifiedTypeName()) + type.dimension() + ".class"; 13.138 @@ -2161,7 +2161,7 @@ 13.139 } 13.140 return buf.toString(); 13.141 } else if (annotationValue.value() instanceof MemberDoc) { 13.142 - return getDocLink(LinkInfoImpl.CONTEXT_ANNOTATION, 13.143 + return getDocLink(LinkInfoImpl.Kind.ANNOTATION, 13.144 (MemberDoc) annotationValue.value(), 13.145 ((MemberDoc) annotationValue.value()).name(), false); 13.146 } else {
14.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java Fri May 10 15:15:50 2013 +0200 14.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java Tue May 14 10:14:51 2013 -0700 14.3 @@ -1,5 +1,5 @@ 14.4 /* 14.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 14.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 14.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 14.8 * 14.9 * This code is free software; you can redistribute it and/or modify it 14.10 @@ -130,7 +130,7 @@ 14.11 pre.addContent(fieldTypeStr); 14.12 } else { 14.13 Content fieldContent = new RawHtml(writer.getLink(new LinkInfoImpl( 14.14 - configuration, LinkInfoImpl.CONTEXT_SERIAL_MEMBER, fieldType))); 14.15 + configuration, LinkInfoImpl.Kind.SERIAL_MEMBER, fieldType))); 14.16 pre.addContent(fieldContent); 14.17 } 14.18 pre.addContent(fieldDimensions + " ");
15.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java Fri May 10 15:15:50 2013 +0200 15.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java Tue May 14 10:14:51 2013 -0700 15.3 @@ -121,7 +121,7 @@ 15.4 protected LinkOutput getTypeParameterLink(LinkInfo linkInfo, 15.5 Type typeParam) { 15.6 LinkInfoImpl typeLinkInfo = new LinkInfoImpl(m_writer.configuration, 15.7 - linkInfo.getContext(), typeParam); 15.8 + ((LinkInfoImpl) linkInfo).getContext(), typeParam); 15.9 typeLinkInfo.excludeTypeBounds = linkInfo.excludeTypeBounds; 15.10 typeLinkInfo.excludeTypeParameterLinks = linkInfo.excludeTypeParameterLinks; 15.11 typeLinkInfo.linkToSelf = linkInfo.linkToSelf; 15.12 @@ -204,7 +204,7 @@ 15.13 * @param linkInfo the information about the link. 15.14 */ 15.15 private DocPath getPath(LinkInfoImpl linkInfo) { 15.16 - if (linkInfo.context == LinkInfoImpl.PACKAGE_FRAME) { 15.17 + if (linkInfo.context == LinkInfoImpl.Kind.PACKAGE_FRAME) { 15.18 //Not really necessary to do this but we want to be consistent 15.19 //with 1.4.2 output. 15.20 return DocPath.forName(linkInfo.classDoc);
16.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java Fri May 10 15:15:50 2013 +0200 16.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java Tue May 14 10:14:51 2013 -0700 16.3 @@ -38,177 +38,181 @@ 16.4 */ 16.5 public class LinkInfoImpl extends LinkInfo { 16.6 16.7 - /** 16.8 - * Indicate that the link appears in a class list. 16.9 - */ 16.10 - public static final int ALL_CLASSES_FRAME = 1; 16.11 + public enum Kind { 16.12 + DEFAULT, 16.13 16.14 - /** 16.15 - * Indicate that the link appears in a class documentation. 16.16 - */ 16.17 - public static final int CONTEXT_CLASS = 2; 16.18 + /** 16.19 + * Indicate that the link appears in a class list. 16.20 + */ 16.21 + ALL_CLASSES_FRAME, 16.22 16.23 - /** 16.24 - * Indicate that the link appears in member documentation. 16.25 - */ 16.26 - public static final int CONTEXT_MEMBER = 3; 16.27 + /** 16.28 + * Indicate that the link appears in a class documentation. 16.29 + */ 16.30 + CLASS, 16.31 16.32 - /** 16.33 - * Indicate that the link appears in class use documentation. 16.34 - */ 16.35 - public static final int CONTEXT_CLASS_USE = 4; 16.36 + /** 16.37 + * Indicate that the link appears in member documentation. 16.38 + */ 16.39 + MEMBER, 16.40 16.41 - /** 16.42 - * Indicate that the link appears in index documentation. 16.43 - */ 16.44 - public static final int CONTEXT_INDEX = 5; 16.45 + /** 16.46 + * Indicate that the link appears in class use documentation. 16.47 + */ 16.48 + CLASS_USE, 16.49 16.50 - /** 16.51 - * Indicate that the link appears in constant value summary. 16.52 - */ 16.53 - public static final int CONTEXT_CONSTANT_SUMMARY = 6; 16.54 + /** 16.55 + * Indicate that the link appears in index documentation. 16.56 + */ 16.57 + INDEX, 16.58 16.59 - /** 16.60 - * Indicate that the link appears in serialized form documentation. 16.61 - */ 16.62 - public static final int CONTEXT_SERIALIZED_FORM = 7; 16.63 + /** 16.64 + * Indicate that the link appears in constant value summary. 16.65 + */ 16.66 + CONSTANT_SUMMARY, 16.67 16.68 - /** 16.69 - * Indicate that the link appears in serial member documentation. 16.70 - */ 16.71 - public static final int CONTEXT_SERIAL_MEMBER = 8; 16.72 + /** 16.73 + * Indicate that the link appears in serialized form documentation. 16.74 + */ 16.75 + SERIALIZED_FORM, 16.76 16.77 - /** 16.78 - * Indicate that the link appears in package documentation. 16.79 - */ 16.80 - public static final int CONTEXT_PACKAGE = 9; 16.81 + /** 16.82 + * Indicate that the link appears in serial member documentation. 16.83 + */ 16.84 + SERIAL_MEMBER, 16.85 16.86 - /** 16.87 - * Indicate that the link appears in see tag documentation. 16.88 - */ 16.89 - public static final int CONTEXT_SEE_TAG = 10; 16.90 + /** 16.91 + * Indicate that the link appears in package documentation. 16.92 + */ 16.93 + PACKAGE, 16.94 16.95 - /** 16.96 - * Indicate that the link appears in value tag documentation. 16.97 - */ 16.98 - public static final int CONTEXT_VALUE_TAG = 11; 16.99 + /** 16.100 + * Indicate that the link appears in see tag documentation. 16.101 + */ 16.102 + SEE_TAG, 16.103 16.104 - /** 16.105 - * Indicate that the link appears in tree documentation. 16.106 - */ 16.107 - public static final int CONTEXT_TREE = 12; 16.108 + /** 16.109 + * Indicate that the link appears in value tag documentation. 16.110 + */ 16.111 + VALUE_TAG, 16.112 16.113 - /** 16.114 - * Indicate that the link appears in a class list. 16.115 - */ 16.116 - public static final int PACKAGE_FRAME = 13; 16.117 + /** 16.118 + * Indicate that the link appears in tree documentation. 16.119 + */ 16.120 + TREE, 16.121 16.122 - /** 16.123 - * The header in the class documentation. 16.124 - */ 16.125 - public static final int CONTEXT_CLASS_HEADER = 14; 16.126 + /** 16.127 + * Indicate that the link appears in a class list. 16.128 + */ 16.129 + PACKAGE_FRAME, 16.130 16.131 - /** 16.132 - * The signature in the class documentation. 16.133 - */ 16.134 - public static final int CONTEXT_CLASS_SIGNATURE = 15; 16.135 + /** 16.136 + * The header in the class documentation. 16.137 + */ 16.138 + CLASS_HEADER, 16.139 16.140 - /** 16.141 - * The return type of a method. 16.142 - */ 16.143 - public static final int CONTEXT_RETURN_TYPE = 16; 16.144 + /** 16.145 + * The signature in the class documentation. 16.146 + */ 16.147 + CLASS_SIGNATURE, 16.148 16.149 - /** 16.150 - * The return type of a method in a member summary. 16.151 - */ 16.152 - public static final int CONTEXT_SUMMARY_RETURN_TYPE = 17; 16.153 + /** 16.154 + * The return type of a method. 16.155 + */ 16.156 + RETURN_TYPE, 16.157 16.158 - /** 16.159 - * The type of a method/constructor parameter. 16.160 - */ 16.161 - public static final int CONTEXT_EXECUTABLE_MEMBER_PARAM = 18; 16.162 + /** 16.163 + * The return type of a method in a member summary. 16.164 + */ 16.165 + SUMMARY_RETURN_TYPE, 16.166 16.167 - /** 16.168 - * Super interface links. 16.169 - */ 16.170 - public static final int CONTEXT_SUPER_INTERFACES = 19; 16.171 + /** 16.172 + * The type of a method/constructor parameter. 16.173 + */ 16.174 + EXECUTABLE_MEMBER_PARAM, 16.175 16.176 - /** 16.177 - * Implemented interface links. 16.178 - */ 16.179 - public static final int CONTEXT_IMPLEMENTED_INTERFACES = 20; 16.180 + /** 16.181 + * Super interface links. 16.182 + */ 16.183 + SUPER_INTERFACES, 16.184 16.185 - /** 16.186 - * Implemented class links. 16.187 - */ 16.188 - public static final int CONTEXT_IMPLEMENTED_CLASSES = 21; 16.189 + /** 16.190 + * Implemented interface links. 16.191 + */ 16.192 + IMPLEMENTED_INTERFACES, 16.193 16.194 - /** 16.195 - * Subinterface links. 16.196 - */ 16.197 - public static final int CONTEXT_SUBINTERFACES = 22; 16.198 + /** 16.199 + * Implemented class links. 16.200 + */ 16.201 + IMPLEMENTED_CLASSES, 16.202 16.203 - /** 16.204 - * Subclasses links. 16.205 - */ 16.206 - public static final int CONTEXT_SUBCLASSES = 23; 16.207 + /** 16.208 + * Subinterface links. 16.209 + */ 16.210 + SUBINTERFACES, 16.211 16.212 - /** 16.213 - * The signature in the class documentation (implements/extends portion). 16.214 - */ 16.215 - public static final int CONTEXT_CLASS_SIGNATURE_PARENT_NAME = 24; 16.216 + /** 16.217 + * Subclasses links. 16.218 + */ 16.219 + SUBCLASSES, 16.220 16.221 - /** 16.222 - * The header for method documentation copied from parent. 16.223 - */ 16.224 - public static final int CONTEXT_METHOD_DOC_COPY = 26; 16.225 + /** 16.226 + * The signature in the class documentation (implements/extends portion). 16.227 + */ 16.228 + CLASS_SIGNATURE_PARENT_NAME, 16.229 16.230 - /** 16.231 - * Method "specified by" link. 16.232 - */ 16.233 - public static final int CONTEXT_METHOD_SPECIFIED_BY = 27; 16.234 + /** 16.235 + * The header for method documentation copied from parent. 16.236 + */ 16.237 + METHOD_DOC_COPY, 16.238 16.239 - /** 16.240 - * Method "overrides" link. 16.241 - */ 16.242 - public static final int CONTEXT_METHOD_OVERRIDES = 28; 16.243 + /** 16.244 + * Method "specified by" link. 16.245 + */ 16.246 + METHOD_SPECIFIED_BY, 16.247 16.248 - /** 16.249 - * Annotation link. 16.250 - */ 16.251 - public static final int CONTEXT_ANNOTATION = 29; 16.252 + /** 16.253 + * Method "overrides" link. 16.254 + */ 16.255 + METHOD_OVERRIDES, 16.256 16.257 - /** 16.258 - * The header for field documentation copied from parent. 16.259 - */ 16.260 - public static final int CONTEXT_FIELD_DOC_COPY = 30; 16.261 + /** 16.262 + * Annotation link. 16.263 + */ 16.264 + ANNOTATION, 16.265 16.266 - /** 16.267 - * The parent nodes int the class tree. 16.268 - */ 16.269 - public static final int CONTEXT_CLASS_TREE_PARENT = 31; 16.270 + /** 16.271 + * The header for field documentation copied from parent. 16.272 + */ 16.273 + FIELD_DOC_COPY, 16.274 16.275 - /** 16.276 - * The type parameters of a method or constructor. 16.277 - */ 16.278 - public static final int CONTEXT_MEMBER_TYPE_PARAMS = 32; 16.279 + /** 16.280 + * The parent nodes in the class tree. 16.281 + */ 16.282 + CLASS_TREE_PARENT, 16.283 16.284 - /** 16.285 - * Indicate that the link appears in class use documentation. 16.286 - */ 16.287 - public static final int CONTEXT_CLASS_USE_HEADER = 33; 16.288 + /** 16.289 + * The type parameters of a method or constructor. 16.290 + */ 16.291 + MEMBER_TYPE_PARAMS, 16.292 16.293 - /** 16.294 - * The header for property documentation copied from parent. 16.295 - */ 16.296 - public static final int CONTEXT_PROPERTY_DOC_COPY = 34; 16.297 + /** 16.298 + * Indicate that the link appears in class use documentation. 16.299 + */ 16.300 + CLASS_USE_HEADER, 16.301 + 16.302 + /** 16.303 + * The header for property documentation copied from parent. 16.304 + */ 16.305 + PROPERTY_DOC_COPY 16.306 + } 16.307 16.308 public final ConfigurationImpl configuration; 16.309 16.310 /** 16.311 - * The integer indicating the location of the link. 16.312 + * The location of the link. 16.313 */ 16.314 - public int context; 16.315 + public Kind context = Kind.DEFAULT; 16.316 16.317 /** 16.318 * The value of the marker #. 16.319 @@ -235,7 +239,7 @@ 16.320 * @param target the value of the target attribute. 16.321 */ 16.322 public LinkInfoImpl(ConfigurationImpl configuration, 16.323 - int context, ClassDoc classDoc, String label, String target) { 16.324 + Kind context, ClassDoc classDoc, String label, String target) { 16.325 this.configuration = configuration; 16.326 this.classDoc = classDoc; 16.327 this.label = label; 16.328 @@ -255,7 +259,7 @@ 16.329 * @param styleName String style of text defined in style sheet. 16.330 */ 16.331 public LinkInfoImpl(ConfigurationImpl configuration, 16.332 - int context, ClassDoc classDoc, String where, String label, 16.333 + Kind context, ClassDoc classDoc, String where, String label, 16.334 boolean isStrong, String styleName) { 16.335 this.configuration = configuration; 16.336 this.classDoc = classDoc; 16.337 @@ -277,7 +281,7 @@ 16.338 * @param isStrong true if the link should be strong. 16.339 */ 16.340 public LinkInfoImpl(ConfigurationImpl configuration, 16.341 - int context, ClassDoc classDoc, String where, String label, 16.342 + Kind context, ClassDoc classDoc, String where, String label, 16.343 boolean isStrong) { 16.344 this.configuration = configuration; 16.345 this.classDoc = classDoc; 16.346 @@ -311,7 +315,7 @@ 16.347 * @param isStrong true if the link should be strong. 16.348 */ 16.349 public LinkInfoImpl(ConfigurationImpl configuration, 16.350 - int context, ExecutableMemberDoc executableMemberDoc, 16.351 + Kind context, ExecutableMemberDoc executableMemberDoc, 16.352 boolean isStrong) { 16.353 this.configuration = configuration; 16.354 this.executableMemberDoc = executableMemberDoc; 16.355 @@ -328,7 +332,7 @@ 16.356 * @param isStrong true if the link should be strong. 16.357 */ 16.358 public LinkInfoImpl(ConfigurationImpl configuration, 16.359 - int context, ClassDoc classDoc, boolean isStrong) { 16.360 + Kind context, ClassDoc classDoc, boolean isStrong) { 16.361 this.configuration = configuration; 16.362 this.classDoc = classDoc; 16.363 this.isStrong = isStrong; 16.364 @@ -343,7 +347,7 @@ 16.365 * @param type the class to link to. 16.366 */ 16.367 public LinkInfoImpl(ConfigurationImpl configuration, 16.368 - int context, Type type) { 16.369 + Kind context, Type type) { 16.370 this.configuration = configuration; 16.371 this.type = type; 16.372 setContext(context); 16.373 @@ -358,7 +362,7 @@ 16.374 * @param isVarArg true if this is a link to a var arg. 16.375 */ 16.376 public LinkInfoImpl(ConfigurationImpl configuration, 16.377 - int context, Type type, boolean isVarArg) { 16.378 + Kind context, Type type, boolean isVarArg) { 16.379 this.configuration = configuration; 16.380 this.type = type; 16.381 this.isVarArg = isVarArg; 16.382 @@ -375,7 +379,7 @@ 16.383 * @param isStrong true if the link should be strong. 16.384 */ 16.385 public LinkInfoImpl(ConfigurationImpl configuration, 16.386 - int context, Type type, String label, 16.387 + Kind context, Type type, String label, 16.388 boolean isStrong) { 16.389 this.configuration = configuration; 16.390 this.type = type; 16.391 @@ -394,7 +398,7 @@ 16.392 * @param isStrong true if the link should be strong. 16.393 */ 16.394 public LinkInfoImpl(ConfigurationImpl configuration, 16.395 - int context, ClassDoc classDoc, String label, 16.396 + Kind context, ClassDoc classDoc, String label, 16.397 boolean isStrong) { 16.398 this.configuration = configuration; 16.399 this.classDoc = classDoc; 16.400 @@ -406,7 +410,7 @@ 16.401 /** 16.402 * {@inheritDoc} 16.403 */ 16.404 - public int getContext() { 16.405 + public Kind getContext() { 16.406 return context; 16.407 } 16.408 16.409 @@ -418,56 +422,56 @@ 16.410 * 16.411 * @param c the context id to set. 16.412 */ 16.413 - public void setContext(int c) { 16.414 + public final void setContext(Kind c) { 16.415 //NOTE: Put context specific link code here. 16.416 switch (c) { 16.417 case ALL_CLASSES_FRAME: 16.418 case PACKAGE_FRAME: 16.419 - case CONTEXT_IMPLEMENTED_CLASSES: 16.420 - case CONTEXT_SUBCLASSES: 16.421 - case CONTEXT_METHOD_DOC_COPY: 16.422 - case CONTEXT_FIELD_DOC_COPY: 16.423 - case CONTEXT_PROPERTY_DOC_COPY: 16.424 - case CONTEXT_CLASS_USE_HEADER: 16.425 + case IMPLEMENTED_CLASSES: 16.426 + case SUBCLASSES: 16.427 + case METHOD_DOC_COPY: 16.428 + case FIELD_DOC_COPY: 16.429 + case PROPERTY_DOC_COPY: 16.430 + case CLASS_USE_HEADER: 16.431 includeTypeInClassLinkLabel = false; 16.432 break; 16.433 16.434 - case CONTEXT_ANNOTATION: 16.435 + case ANNOTATION: 16.436 excludeTypeParameterLinks = true; 16.437 excludeTypeBounds = true; 16.438 break; 16.439 16.440 - case CONTEXT_IMPLEMENTED_INTERFACES: 16.441 - case CONTEXT_SUPER_INTERFACES: 16.442 - case CONTEXT_SUBINTERFACES: 16.443 - case CONTEXT_CLASS_TREE_PARENT: 16.444 - case CONTEXT_TREE: 16.445 - case CONTEXT_CLASS_SIGNATURE_PARENT_NAME: 16.446 + case IMPLEMENTED_INTERFACES: 16.447 + case SUPER_INTERFACES: 16.448 + case SUBINTERFACES: 16.449 + case CLASS_TREE_PARENT: 16.450 + case TREE: 16.451 + case CLASS_SIGNATURE_PARENT_NAME: 16.452 excludeTypeParameterLinks = true; 16.453 excludeTypeBounds = true; 16.454 includeTypeInClassLinkLabel = false; 16.455 includeTypeAsSepLink = true; 16.456 break; 16.457 16.458 - case CONTEXT_PACKAGE: 16.459 - case CONTEXT_CLASS_USE: 16.460 - case CONTEXT_CLASS_HEADER: 16.461 - case CONTEXT_CLASS_SIGNATURE: 16.462 + case PACKAGE: 16.463 + case CLASS_USE: 16.464 + case CLASS_HEADER: 16.465 + case CLASS_SIGNATURE: 16.466 excludeTypeParameterLinks = true; 16.467 includeTypeAsSepLink = true; 16.468 includeTypeInClassLinkLabel = false; 16.469 break; 16.470 16.471 - case CONTEXT_MEMBER_TYPE_PARAMS: 16.472 + case MEMBER_TYPE_PARAMS: 16.473 includeTypeAsSepLink = true; 16.474 includeTypeInClassLinkLabel = false; 16.475 break; 16.476 16.477 - case CONTEXT_RETURN_TYPE: 16.478 - case CONTEXT_SUMMARY_RETURN_TYPE: 16.479 + case RETURN_TYPE: 16.480 + case SUMMARY_RETURN_TYPE: 16.481 excludeTypeBounds = true; 16.482 break; 16.483 - case CONTEXT_EXECUTABLE_MEMBER_PARAM: 16.484 + case EXECUTABLE_MEMBER_PARAM: 16.485 excludeTypeBounds = true; 16.486 break; 16.487 }
17.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Fri May 10 15:15:50 2013 +0200 17.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Tue May 14 10:14:51 2013 -0700 17.3 @@ -153,7 +153,7 @@ 17.4 writer.addInlineComment(method, methodDocTree); 17.5 } else { 17.6 Content link = new RawHtml( 17.7 - writer.getDocLink(LinkInfoImpl.CONTEXT_METHOD_DOC_COPY, 17.8 + writer.getDocLink(LinkInfoImpl.Kind.METHOD_DOC_COPY, 17.9 holder.asClassDoc(), method, 17.10 holder.asClassDoc().isIncluded() ? 17.11 holder.typeName() : holder.qualifiedTypeName(), 17.12 @@ -261,7 +261,7 @@ 17.13 */ 17.14 public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { 17.15 Content classLink = new RawHtml(writer.getPreQualifiedClassLink( 17.16 - LinkInfoImpl.CONTEXT_MEMBER, cd, false)); 17.17 + LinkInfoImpl.Kind.MEMBER, cd, false)); 17.18 Content label = new StringContent(cd.isClass() ? 17.19 configuration.getText("doclet.Methods_Inherited_From_Class") : 17.20 configuration.getText("doclet.Methods_Inherited_From_Interface")); 17.21 @@ -300,14 +300,14 @@ 17.22 return; 17.23 } 17.24 Content label = writer.overridesLabel; 17.25 - int context = LinkInfoImpl.CONTEXT_METHOD_OVERRIDES; 17.26 + LinkInfoImpl.Kind context = LinkInfoImpl.Kind.METHOD_OVERRIDES; 17.27 17.28 if (method != null) { 17.29 if (overriddenType.asClassDoc().isAbstract() && method.isAbstract()){ 17.30 //Abstract method is implemented from abstract class, 17.31 //not overridden 17.32 label = writer.specifiedByLabel; 17.33 - context = LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY; 17.34 + context = LinkInfoImpl.Kind.METHOD_SPECIFIED_BY; 17.35 } 17.36 Content dt = HtmlTree.DT(HtmlTree.STRONG(label)); 17.37 dl.addContent(dt); 17.38 @@ -316,7 +316,7 @@ 17.39 Content codeOverridenTypeLink = HtmlTree.CODE(overriddenTypeLink); 17.40 String name = method.name(); 17.41 Content methlink = new RawHtml(writer.getLink( 17.42 - new LinkInfoImpl(writer.configuration, LinkInfoImpl.CONTEXT_MEMBER, 17.43 + new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER, 17.44 overriddenType.asClassDoc(), 17.45 writer.getAnchor(method), name, false))); 17.46 Content codeMethLink = HtmlTree.CODE(methlink); 17.47 @@ -362,12 +362,12 @@ 17.48 MethodDoc implementedMeth = implementedMethods[i]; 17.49 Type intfac = implementedMethodsFinder.getMethodHolder(implementedMeth); 17.50 Content intfaclink = new RawHtml(writer.getLink(new LinkInfoImpl( 17.51 - writer.configuration, LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac))); 17.52 + writer.configuration, LinkInfoImpl.Kind.METHOD_SPECIFIED_BY, intfac))); 17.53 Content codeIntfacLink = HtmlTree.CODE(intfaclink); 17.54 Content dt = HtmlTree.DT(HtmlTree.STRONG(writer.specifiedByLabel)); 17.55 dl.addContent(dt); 17.56 Content methlink = new RawHtml(writer.getDocLink( 17.57 - LinkInfoImpl.CONTEXT_MEMBER, implementedMeth, 17.58 + LinkInfoImpl.Kind.MEMBER, implementedMeth, 17.59 implementedMeth.name(), false)); 17.60 Content codeMethLink = HtmlTree.CODE(methlink); 17.61 Content dd = HtmlTree.DD(codeMethLink); 17.62 @@ -389,7 +389,7 @@ 17.63 Type type = method.returnType(); 17.64 if (type != null) { 17.65 Content linkContent = new RawHtml(writer.getLink( 17.66 - new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_RETURN_TYPE, type))); 17.67 + new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type))); 17.68 htmltree.addContent(linkContent); 17.69 htmltree.addContent(writer.getSpace()); 17.70 }
18.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Fri May 10 15:15:50 2013 +0200 18.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Tue May 14 10:14:51 2013 -0700 18.3 @@ -1,5 +1,5 @@ 18.4 /* 18.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 18.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 18.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 18.8 * 18.9 * This code is free software; you can redistribute it and/or modify it 18.10 @@ -149,7 +149,7 @@ 18.11 */ 18.12 public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { 18.13 Content classLink = new RawHtml(writer.getPreQualifiedClassLink( 18.14 - LinkInfoImpl.CONTEXT_MEMBER, cd, false)); 18.15 + LinkInfoImpl.Kind.MEMBER, cd, false)); 18.16 Content label = new StringContent(cd.isInterface() ? 18.17 configuration.getText("doclet.Nested_Classes_Interface_Inherited_From_Interface") : 18.18 configuration.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Class")); 18.19 @@ -163,7 +163,7 @@ 18.20 /** 18.21 * {@inheritDoc} 18.22 */ 18.23 - protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 18.24 + protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, 18.25 Content tdSummary) { 18.26 Content strong = HtmlTree.STRONG(new RawHtml( 18.27 writer.getLink(new LinkInfoImpl(configuration, context, (ClassDoc)member, false)))); 18.28 @@ -177,7 +177,7 @@ 18.29 protected void addInheritedSummaryLink(ClassDoc cd, 18.30 ProgramElementDoc member, Content linksTree) { 18.31 linksTree.addContent(new RawHtml( 18.32 - writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_MEMBER, 18.33 + writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, 18.34 (ClassDoc)member, false)))); 18.35 } 18.36 18.37 @@ -194,7 +194,7 @@ 18.38 * {@inheritDoc} 18.39 */ 18.40 protected Content getDeprecatedLink(ProgramElementDoc member) { 18.41 - return writer.getQualifiedClassLink(LinkInfoImpl.CONTEXT_MEMBER, 18.42 + return writer.getQualifiedClassLink(LinkInfoImpl.Kind.MEMBER, 18.43 (ClassDoc)member); 18.44 } 18.45
19.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Fri May 10 15:15:50 2013 +0200 19.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Tue May 14 10:14:51 2013 -0700 19.3 @@ -183,7 +183,7 @@ 19.4 printedHeader = true; 19.5 } 19.6 Content link = new RawHtml (getLink(new LinkInfoImpl(configuration, 19.7 - LinkInfoImpl.PACKAGE_FRAME, arr[i], 19.8 + LinkInfoImpl.Kind.PACKAGE_FRAME, arr[i], 19.9 (arr[i].isInterface() ? italicsText(arr[i].name()) : 19.10 arr[i].name()),"classFrame"))); 19.11 Content li = HtmlTree.LI(link);
20.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Fri May 10 15:15:50 2013 +0200 20.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Tue May 14 10:14:51 2013 -0700 20.3 @@ -1,5 +1,5 @@ 20.4 /* 20.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 20.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 20.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.8 * 20.9 * This code is free software; you can redistribute it and/or modify it 20.10 @@ -179,7 +179,7 @@ 20.11 continue; 20.12 } 20.13 Content classContent = new RawHtml(getLink(new LinkInfoImpl( 20.14 - configuration, LinkInfoImpl.CONTEXT_PACKAGE, classes[i], 20.15 + configuration, LinkInfoImpl.Kind.PACKAGE, classes[i], 20.16 false))); 20.17 Content tdClass = HtmlTree.TD(HtmlStyle.colFirst, classContent); 20.18 HtmlTree tr = HtmlTree.TR(tdClass);
21.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java Fri May 10 15:15:50 2013 +0200 21.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java Tue May 14 10:14:51 2013 -0700 21.3 @@ -174,7 +174,7 @@ 21.4 printedHeader = true; 21.5 } 21.6 Content link = new RawHtml (getLink(new LinkInfoImpl(configuration, 21.7 - LinkInfoImpl.PACKAGE_FRAME, arr[i], 21.8 + LinkInfoImpl.Kind.PACKAGE_FRAME, arr[i], 21.9 (arr[i].isInterface() ? italicsText(arr[i].name()) : 21.10 arr[i].name()),"classFrame"))); 21.11 Content li = HtmlTree.LI(link);
22.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Fri May 10 15:15:50 2013 +0200 22.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Tue May 14 10:14:51 2013 -0700 22.3 @@ -99,7 +99,7 @@ 22.4 writer.addAnnotationInfo(property, pre); 22.5 addModifiers(property, pre); 22.6 Content propertylink = new RawHtml(writer.getLink(new LinkInfoImpl( 22.7 - configuration, LinkInfoImpl.CONTEXT_MEMBER, 22.8 + configuration, LinkInfoImpl.Kind.MEMBER, 22.9 property.returnType()))); 22.10 pre.addContent(propertylink); 22.11 pre.addContent(" "); 22.12 @@ -129,7 +129,7 @@ 22.13 writer.addInlineComment(property, propertyDocTree); 22.14 } else { 22.15 Content link = new RawHtml( 22.16 - writer.getDocLink(LinkInfoImpl.CONTEXT_PROPERTY_DOC_COPY, 22.17 + writer.getDocLink(LinkInfoImpl.Kind.PROPERTY_DOC_COPY, 22.18 holder, property, 22.19 holder.isIncluded() ? 22.20 holder.typeName() : holder.qualifiedTypeName(), 22.21 @@ -236,7 +236,7 @@ 22.22 */ 22.23 public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { 22.24 Content classLink = new RawHtml(writer.getPreQualifiedClassLink( 22.25 - LinkInfoImpl.CONTEXT_MEMBER, cd, false)); 22.26 + LinkInfoImpl.Kind.MEMBER, cd, false)); 22.27 Content label = new StringContent(cd.isClass() ? 22.28 configuration.getText("doclet.Properties_Inherited_From_Class") : 22.29 configuration.getText("doclet.Properties_Inherited_From_Interface")); 22.30 @@ -250,7 +250,7 @@ 22.31 /** 22.32 * {@inheritDoc} 22.33 */ 22.34 - protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 22.35 + protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, 22.36 Content tdSummary) { 22.37 Content strong = HtmlTree.STRONG(new RawHtml( 22.38 writer.getDocLink(context, 22.39 @@ -270,7 +270,7 @@ 22.40 protected void addInheritedSummaryLink(ClassDoc cd, 22.41 ProgramElementDoc member, Content linksTree) { 22.42 linksTree.addContent(new RawHtml( 22.43 - writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, cd, (MemberDoc)member, 22.44 + writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc)member, 22.45 ((member.name().lastIndexOf("Property") != -1) && configuration.javafx) 22.46 ? member.name().substring(0, member.name().length() - "Property".length()) 22.47 : member.name(), 22.48 @@ -289,7 +289,7 @@ 22.49 * {@inheritDoc} 22.50 */ 22.51 protected Content getDeprecatedLink(ProgramElementDoc member) { 22.52 - return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, 22.53 + return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, 22.54 (MemberDoc) member, ((MethodDoc)member).qualifiedName()); 22.55 } 22.56
23.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java Fri May 10 15:15:50 2013 +0200 23.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java Tue May 14 10:14:51 2013 -0700 23.3 @@ -1,5 +1,5 @@ 23.4 /* 23.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 23.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 23.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 23.8 * 23.9 * This code is free software; you can redistribute it and/or modify it 23.10 @@ -136,7 +136,7 @@ 23.11 String superClassLink = 23.12 classDoc.superclassType() != null ? 23.13 getLink(new LinkInfoImpl(configuration, 23.14 - LinkInfoImpl.CONTEXT_SERIALIZED_FORM, 23.15 + LinkInfoImpl.Kind.SERIALIZED_FORM, 23.16 classDoc.superclassType())) : 23.17 null; 23.18
24.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Fri May 10 15:15:50 2013 +0200 24.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Tue May 14 10:14:51 2013 -0700 24.3 @@ -1,5 +1,5 @@ 24.4 /* 24.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 24.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 24.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 24.8 * 24.9 * This code is free software; you can redistribute it and/or modify it 24.10 @@ -247,7 +247,7 @@ 24.11 result += throwsTag.exceptionType() == null ? 24.12 htmlWriter.codeText(throwsTag.exceptionName()) : 24.13 htmlWriter.codeText( 24.14 - htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_MEMBER, 24.15 + htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, 24.16 throwsTag.exceptionType()))); 24.17 TagletOutput text = new TagletOutputImpl( 24.18 htmlWriter.commentTagsToString(throwsTag, null, 24.19 @@ -265,7 +265,7 @@ 24.20 public TagletOutput throwsTagOutput(Type throwsType) { 24.21 return new TagletOutputImpl(DocletConstants.NL + "<dd>" + 24.22 htmlWriter.codeText(htmlWriter.getLink( 24.23 - new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_MEMBER, throwsType))) + "</dd>"); 24.24 + new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType))) + "</dd>"); 24.25 } 24.26 24.27 /** 24.28 @@ -274,7 +274,7 @@ 24.29 public TagletOutput valueTagOutput(FieldDoc field, String constantVal, 24.30 boolean includeLink) { 24.31 return new TagletOutputImpl(includeLink ? 24.32 - htmlWriter.getDocLink(LinkInfoImpl.CONTEXT_VALUE_TAG, field, 24.33 + htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field, 24.34 constantVal, false) : constantVal); 24.35 } 24.36
25.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java Fri May 10 15:15:50 2013 +0200 25.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java Tue May 14 10:14:51 2013 -0700 25.3 @@ -121,21 +121,6 @@ 25.4 public int displayLength = 0; 25.5 25.6 /** 25.7 - * Return the id indicating where the link appears in the documentation. 25.8 - * This is used for special processing of different types of links. 25.9 - * 25.10 - * @return the id indicating where the link appears in the documentation. 25.11 - */ 25.12 - public abstract int getContext(); 25.13 - 25.14 - /** 25.15 - * Set the context. 25.16 - * 25.17 - * @param c the context id to set. 25.18 - */ 25.19 - public abstract void setContext(int c); 25.20 - 25.21 - /** 25.22 * Return true if this link is linkable and false if we can't link to the 25.23 * desired place. 25.24 *