1.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java Wed Nov 14 17:23:10 2012 -0800 1.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java Thu Nov 15 09:18:36 2012 -0800 1.3 @@ -54,12 +54,12 @@ 1.4 /** 1.5 * The annotation type being documented. 1.6 */ 1.7 - private AnnotationTypeDoc annotationTypeDoc; 1.8 + private final AnnotationTypeDoc annotationTypeDoc; 1.9 1.10 /** 1.11 * The doclet specific writer. 1.12 */ 1.13 - private AnnotationTypeWriter writer; 1.14 + private final AnnotationTypeWriter writer; 1.15 1.16 /** 1.17 * The content tree for the annotation documentation. 1.18 @@ -69,38 +69,37 @@ 1.19 /** 1.20 * Construct a new ClassBuilder. 1.21 * 1.22 - * @param configuration the current configuration of the 1.23 - * doclet. 1.24 + * @param context the build context. 1.25 + * @param annotationTypeDoc the class being documented. 1.26 + * @param writer the doclet specific writer. 1.27 */ 1.28 - private AnnotationTypeBuilder(Configuration configuration) { 1.29 - super(configuration); 1.30 + private AnnotationTypeBuilder(Context context, 1.31 + AnnotationTypeDoc annotationTypeDoc, 1.32 + AnnotationTypeWriter writer) { 1.33 + super(context); 1.34 + this.annotationTypeDoc = annotationTypeDoc; 1.35 + this.writer = writer; 1.36 } 1.37 1.38 /** 1.39 * Construct a new ClassBuilder. 1.40 * 1.41 - * @param configuration the current configuration of the doclet. 1.42 + * @param context the build context. 1.43 * @param annotationTypeDoc the class being documented. 1.44 * @param writer the doclet specific writer. 1.45 */ 1.46 - public static AnnotationTypeBuilder getInstance(Configuration configuration, 1.47 - AnnotationTypeDoc annotationTypeDoc, AnnotationTypeWriter writer) 1.48 - throws Exception { 1.49 - AnnotationTypeBuilder builder = new AnnotationTypeBuilder(configuration); 1.50 - builder.configuration = configuration; 1.51 - builder.annotationTypeDoc = annotationTypeDoc; 1.52 - builder.writer = writer; 1.53 - if(containingPackagesSeen == null) { 1.54 - containingPackagesSeen = new HashSet<String>(); 1.55 - } 1.56 - return builder; 1.57 + public static AnnotationTypeBuilder getInstance(Context context, 1.58 + AnnotationTypeDoc annotationTypeDoc, 1.59 + AnnotationTypeWriter writer) 1.60 + throws Exception { 1.61 + return new AnnotationTypeBuilder(context, annotationTypeDoc, writer); 1.62 } 1.63 1.64 /** 1.65 * {@inheritDoc} 1.66 */ 1.67 public void build() throws IOException { 1.68 - build(LayoutParser.getInstance(configuration).parseXML(ROOT), contentTree); 1.69 + build(layoutParser.parseXML(ROOT), contentTree); 1.70 } 1.71 1.72 /**