/**
  * Construct a new MethodBuilder.
  *
  * @param context the build context.
  * @param classDoc the class whoses members are being documented.
  * @param writer the doclet specific writer.
  */
 private MethodBuilder(Context context, ClassDoc classDoc, MethodWriter writer) {
   super(context);
   this.classDoc = classDoc;
   this.writer = writer;
   visibleMemberMap = new VisibleMemberMap(classDoc, VisibleMemberMap.METHODS, configuration);
   methods = new ArrayList<>(visibleMemberMap.getLeafClassMembers(configuration));
   if (configuration.getMemberComparator() != null) {
     Collections.sort(methods, configuration.getMemberComparator());
   }
 }
Beispiel #2
0
 /**
  * Construct a new EnumConstantsBuilder.
  *
  * @param configuration the current configuration of the doclet.
  * @param classDoc the class whoses members are being documented.
  * @param writer the doclet specific writer.
  */
 public static EnumConstantBuilder getInstance(
     Configuration configuration, ClassDoc classDoc, EnumConstantWriter writer) {
   EnumConstantBuilder builder = new EnumConstantBuilder(configuration);
   builder.classDoc = classDoc;
   builder.writer = writer;
   builder.visibleMemberMap =
       new VisibleMemberMap(classDoc, VisibleMemberMap.ENUM_CONSTANTS, configuration.nodeprecated);
   builder.enumConstants =
       new ArrayList<ProgramElementDoc>(builder.visibleMemberMap.getMembersFor(classDoc));
   if (configuration.getMemberComparator() != null) {
     Collections.sort(builder.enumConstants, configuration.getMemberComparator());
   }
   return builder;
 }
Beispiel #3
0
 /**
  * Construct a new FieldBuilder.
  *
  * @param configuration the current configuration of the doclet.
  * @param classDoc the class whoses members are being documented.
  * @param writer the doclet specific writer.
  */
 public static FieldBuilder getInstance(
     Configuration configuration, ClassDoc classDoc, FieldWriter writer) {
   FieldBuilder builder = new FieldBuilder(configuration);
   builder.classDoc = classDoc;
   builder.writer = writer;
   builder.visibleMemberMap =
       new VisibleMemberMap(classDoc, VisibleMemberMap.FIELDS, configuration.nodeprecated);
   builder.fields =
       new ArrayList<ProgramElementDoc>(
           builder.visibleMemberMap.getLeafClassMembers(configuration));
   if (configuration.getMemberComparator() != null) {
     Collections.sort(builder.fields, configuration.getMemberComparator());
   }
   return builder;
 }