42 * @author Jamie Ho |
40 * @author Jamie Ho |
43 * @author Bhavesh Patel (Modified) |
41 * @author Bhavesh Patel (Modified) |
44 * @since 1.5 |
42 * @since 1.5 |
45 */ |
43 */ |
46 public class AnnotationTypeOptionalMemberBuilder extends |
44 public class AnnotationTypeOptionalMemberBuilder extends |
47 AnnotationTypeRequiredMemberBuilder { |
45 AnnotationTypeRequiredMemberBuilder { |
48 |
46 |
49 |
47 |
50 /** |
48 /** |
51 * Construct a new AnnotationTypeMemberBuilder. |
49 * Construct a new AnnotationTypeMemberBuilder. |
52 * |
50 * |
53 * @param configuration the current configuration of the |
51 * @param context the build context. |
54 * doclet. |
52 * @param classDoc the class whose members are being documented. |
|
53 * @param writer the doclet specific writer. |
55 */ |
54 */ |
56 private AnnotationTypeOptionalMemberBuilder(Configuration configuration) { |
55 private AnnotationTypeOptionalMemberBuilder(Context context, |
57 super(configuration); |
56 ClassDoc classDoc, |
|
57 AnnotationTypeOptionalMemberWriter writer) { |
|
58 super(context, classDoc, writer, |
|
59 VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL); |
58 } |
60 } |
59 |
61 |
60 |
62 |
61 /** |
63 /** |
62 * Construct a new AnnotationTypeMemberBuilder. |
64 * Construct a new AnnotationTypeMemberBuilder. |
63 * |
65 * |
64 * @param configuration the current configuration of the doclet. |
66 * @param context the build context. |
65 * @param classDoc the class whoses members are being documented. |
67 * @param classDoc the class whose members are being documented. |
66 * @param writer the doclet specific writer. |
68 * @param writer the doclet specific writer. |
67 */ |
69 */ |
68 public static AnnotationTypeOptionalMemberBuilder getInstance( |
70 public static AnnotationTypeOptionalMemberBuilder getInstance( |
69 Configuration configuration, ClassDoc classDoc, |
71 Context context, ClassDoc classDoc, |
70 AnnotationTypeOptionalMemberWriter writer) { |
72 AnnotationTypeOptionalMemberWriter writer) { |
71 AnnotationTypeOptionalMemberBuilder builder = |
73 return new AnnotationTypeOptionalMemberBuilder(context, |
72 new AnnotationTypeOptionalMemberBuilder(configuration); |
74 classDoc, writer); |
73 builder.classDoc = classDoc; |
|
74 builder.writer = writer; |
|
75 builder.visibleMemberMap = new VisibleMemberMap(classDoc, |
|
76 VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL, configuration.nodeprecated); |
|
77 builder.members = new ArrayList<ProgramElementDoc>( |
|
78 builder.visibleMemberMap.getMembersFor(classDoc)); |
|
79 if (configuration.getMemberComparator() != null) { |
|
80 Collections.sort(builder.members, |
|
81 configuration.getMemberComparator()); |
|
82 } |
|
83 return builder; |
|
84 } |
75 } |
85 |
76 |
86 /** |
77 /** |
87 * {@inheritDoc} |
78 * {@inheritDoc} |
88 */ |
79 */ |