72 protected int currentMemberIndex; |
72 protected int currentMemberIndex; |
73 |
73 |
74 /** |
74 /** |
75 * Construct a new AnnotationTypeRequiredMemberBuilder. |
75 * Construct a new AnnotationTypeRequiredMemberBuilder. |
76 * |
76 * |
77 * @param configuration the current configuration of the |
77 * @param context the build context. |
78 * doclet. |
78 * @param classDoc the class whose members are being documented. |
79 */ |
79 * @param writer the doclet specific writer. |
80 protected AnnotationTypeRequiredMemberBuilder(Configuration configuration) { |
80 */ |
81 super(configuration); |
81 protected AnnotationTypeRequiredMemberBuilder(Context context, |
|
82 ClassDoc classDoc, |
|
83 AnnotationTypeRequiredMemberWriter writer, |
|
84 int memberType) { |
|
85 super(context); |
|
86 this.classDoc = classDoc; |
|
87 this.writer = writer; |
|
88 this.visibleMemberMap = new VisibleMemberMap(classDoc, memberType, |
|
89 configuration.nodeprecated); |
|
90 this.members = new ArrayList<ProgramElementDoc>( |
|
91 this.visibleMemberMap.getMembersFor(classDoc)); |
|
92 if (configuration.getMemberComparator() != null) { |
|
93 Collections.sort(this.members, configuration.getMemberComparator()); |
|
94 } |
82 } |
95 } |
83 |
96 |
84 |
97 |
85 /** |
98 /** |
86 * Construct a new AnnotationTypeMemberBuilder. |
99 * Construct a new AnnotationTypeMemberBuilder. |
87 * |
100 * |
88 * @param configuration the current configuration of the doclet. |
101 * @param context the build context. |
89 * @param classDoc the class whoses members are being documented. |
102 * @param classDoc the class whose members are being documented. |
90 * @param writer the doclet specific writer. |
103 * @param writer the doclet specific writer. |
91 */ |
104 */ |
92 public static AnnotationTypeRequiredMemberBuilder getInstance( |
105 public static AnnotationTypeRequiredMemberBuilder getInstance( |
93 Configuration configuration, ClassDoc classDoc, |
106 Context context, ClassDoc classDoc, |
94 AnnotationTypeRequiredMemberWriter writer) { |
107 AnnotationTypeRequiredMemberWriter writer) { |
95 AnnotationTypeRequiredMemberBuilder builder = |
108 return new AnnotationTypeRequiredMemberBuilder(context, classDoc, |
96 new AnnotationTypeRequiredMemberBuilder(configuration); |
109 writer, |
97 builder.classDoc = classDoc; |
110 VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED); |
98 builder.writer = writer; |
|
99 builder.visibleMemberMap = new VisibleMemberMap(classDoc, |
|
100 VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED, configuration.nodeprecated); |
|
101 builder.members = new ArrayList<ProgramElementDoc>( |
|
102 builder.visibleMemberMap.getMembersFor(classDoc)); |
|
103 if (configuration.getMemberComparator() != null) { |
|
104 Collections.sort(builder.members, |
|
105 configuration.getMemberComparator()); |
|
106 } |
|
107 return builder; |
|
108 } |
111 } |
109 |
112 |
110 /** |
113 /** |
111 * {@inheritDoc} |
114 * {@inheritDoc} |
112 */ |
115 */ |