384 Element member, |
384 Element member, |
385 Element property) { |
385 Element property) { |
386 CommentUtils cmtutils = configuration.cmtUtils; |
386 CommentUtils cmtutils = configuration.cmtUtils; |
387 final boolean isSetter = isSetter(member); |
387 final boolean isSetter = isSetter(member); |
388 final boolean isGetter = isGetter(member); |
388 final boolean isGetter = isGetter(member); |
389 List<DocTree> firstSentence = new ArrayList<>(); |
389 |
390 List<DocTree> bodyTags = new ArrayList<>(); |
390 List<DocTree> fullBody = new ArrayList<>(); |
391 List<DocTree> blockTags = new ArrayList<>(); |
391 List<DocTree> blockTags = new ArrayList<>(); |
392 if (isGetter || isSetter) { |
392 if (isGetter || isSetter) { |
393 //add "[GS]ets the value of the property PROPERTY_NAME." |
393 //add "[GS]ets the value of the property PROPERTY_NAME." |
394 if (isSetter) { |
394 if (isSetter) { |
395 String text = MessageFormat.format( |
395 String text = MessageFormat.format( |
396 configuration.getText("doclet.PropertySetterWithName"), |
396 configuration.getText("doclet.PropertySetterWithName"), |
397 utils.propertyName((ExecutableElement)member)); |
397 utils.propertyName((ExecutableElement)member)); |
398 firstSentence.addAll(cmtutils.makeFirstSentenceTree(text)); |
398 fullBody.addAll(cmtutils.makeFirstSentenceTree(text)); |
399 } |
399 } |
400 if (isGetter) { |
400 if (isGetter) { |
401 String text = MessageFormat.format( |
401 String text = MessageFormat.format( |
402 configuration.getText("doclet.PropertyGetterWithName"), |
402 configuration.getText("doclet.PropertyGetterWithName"), |
403 utils.propertyName((ExecutableElement) member)); |
403 utils.propertyName((ExecutableElement) member)); |
404 firstSentence.addAll(cmtutils.makeFirstSentenceTree(text)); |
404 fullBody.addAll(cmtutils.makeFirstSentenceTree(text)); |
405 } |
405 } |
406 List<? extends DocTree> propertyTags = utils.getBlockTags(property, "propertyDescription"); |
406 List<? extends DocTree> propertyTags = utils.getBlockTags(property, "propertyDescription"); |
407 if (propertyTags.isEmpty()) { |
407 if (propertyTags.isEmpty()) { |
408 List<? extends DocTree> comment = utils.getBody(property); |
408 List<? extends DocTree> comment = utils.getFullBody(property); |
409 blockTags.addAll(cmtutils.makePropertyDescriptionTree(comment)); |
409 blockTags.addAll(cmtutils.makePropertyDescriptionTree(comment)); |
410 } |
410 } |
411 } else { |
411 } else { |
412 firstSentence.addAll(utils.getBody(property)); |
412 fullBody.addAll(utils.getFullBody(property)); |
413 } |
413 } |
414 |
414 |
415 // copy certain tags |
415 // copy certain tags |
416 List<? extends DocTree> tags = utils.getBlockTags(property, Kind.SINCE); |
416 List<? extends DocTree> tags = utils.getBlockTags(property, Kind.SINCE); |
417 blockTags.addAll(tags); |
417 blockTags.addAll(tags); |
450 sb.append("(").append(typeName).append(")"); |
450 sb.append("(").append(typeName).append(")"); |
451 } |
451 } |
452 blockTags.add(cmtutils.makeSeeTree(sb.toString(), setter)); |
452 blockTags.add(cmtutils.makeSeeTree(sb.toString(), setter)); |
453 } |
453 } |
454 } |
454 } |
455 cmtutils.setDocCommentTree(member, firstSentence, bodyTags, blockTags, utils); |
455 cmtutils.setDocCommentTree(member, fullBody, blockTags, utils); |
456 } |
456 } |
457 |
457 |
458 /** |
458 /** |
459 * Test whether the method is a getter. |
459 * Test whether the method is a getter. |
460 * @param element property method documentation. Needs to be either property |
460 * @param element property method documentation. Needs to be either property |