langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
changeset 41452 ddaef4bba083
parent 40606 eb2c81860c86
child 42000 8b7412f7eecd
equal deleted inserted replaced
41451:a847c7aa25a7 41452:ddaef4bba083
  1451      * @param elem
  1451      * @param elem
  1452      */
  1452      */
  1453     public void setEnumDocumentation(TypeElement elem) {
  1453     public void setEnumDocumentation(TypeElement elem) {
  1454         for (Element e : getMethods(elem)) {
  1454         for (Element e : getMethods(elem)) {
  1455             ExecutableElement ee = (ExecutableElement)e;
  1455             ExecutableElement ee = (ExecutableElement)e;
  1456             if (!getBody(e).isEmpty()) // if already set skip it please
  1456             if (!getFullBody(e).isEmpty()) // ignore if already set
  1457                 continue;
  1457                 continue;
  1458             if (ee.getSimpleName().contentEquals("values") && ee.getParameters().isEmpty()) {
  1458             if (ee.getSimpleName().contentEquals("values") && ee.getParameters().isEmpty()) {
  1459                 configuration.cmtUtils.setEnumValuesTree(configuration, e);
  1459                 configuration.cmtUtils.setEnumValuesTree(configuration, e);
  1460             }
  1460             }
  1461             if (ee.getSimpleName().contentEquals("valueOf") && ee.getParameters().size() == 1) {
  1461             if (ee.getSimpleName().contentEquals("valueOf") && ee.getParameters().size() == 1) {
  2937             wksMap.put(element, new CommentHelper(configuration, element, getTreePath(element), dcTree));
  2937             wksMap.put(element, new CommentHelper(configuration, element, getTreePath(element), dcTree));
  2938         }
  2938         }
  2939         return dcTree;
  2939         return dcTree;
  2940     }
  2940     }
  2941 
  2941 
       
  2942     public List<? extends DocTree> getFullBody(Element element) {
       
  2943         DocCommentTree docCommentTree = getDocCommentTree(element);
       
  2944             return (docCommentTree == null)
       
  2945                     ? Collections.emptyList()
       
  2946                     : docCommentTree.getFullBody();
       
  2947     }
       
  2948 
  2942     public List<? extends DocTree> getBody(Element element) {
  2949     public List<? extends DocTree> getBody(Element element) {
  2943         DocCommentTree docCommentTree = getDocCommentTree(element);
  2950         DocCommentTree docCommentTree = getDocCommentTree(element);
  2944         if (docCommentTree == null)
  2951         return (docCommentTree == null)
  2945             return Collections.emptyList();
  2952                 ? Collections.emptyList()
  2946 
  2953                 : docCommentTree.getFullBody();
  2947         return docCommentTree.getFullBody();
       
  2948     }
  2954     }
  2949 
  2955 
  2950     public List<? extends DocTree> getDeprecatedTrees(Element element) {
  2956     public List<? extends DocTree> getDeprecatedTrees(Element element) {
  2951         return getBlockTags(element, DEPRECATED);
  2957         return getBlockTags(element, DEPRECATED);
  2952     }
  2958     }