< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java

Print this page




2896         return isKind(doctree, START_ELEMENT);
2897     }
2898 
2899     public boolean isText(DocTree doctree) {
2900         return isKind(doctree, TEXT);
2901     }
2902 
2903     public boolean isThrows(DocTree doctree) {
2904         return isKind(doctree, THROWS);
2905     }
2906 
2907     public boolean isUnknownBlockTag(DocTree doctree) {
2908         return isKind(doctree, UNKNOWN_BLOCK_TAG);
2909     }
2910 
2911     public boolean isUnknownInlineTag(DocTree doctree) {
2912         return isKind(doctree, UNKNOWN_INLINE_TAG);
2913     }
2914 
2915     public boolean isValue(DocTree doctree) {
2916         return isKind(doctree, VALUE);
2917     }
2918 
2919     public boolean isVersion(DocTree doctree) {
2920         return isKind(doctree, VERSION);
2921     }
2922 
2923     private boolean isKind(DocTree doctree, DocTree.Kind match) {
2924         return  doctree.getKind() == match;
2925     }
2926 
2927     private final WeakSoftHashMap wksMap = new WeakSoftHashMap(this);
2928 
2929     public CommentHelper getCommentHelper(Element element) {
2930         return wksMap.computeIfAbsent(element);
2931     }
2932 
2933     public void removeCommentHelper(Element element) {
2934         wksMap.remove(element);
2935     }
2936 




2896         return isKind(doctree, START_ELEMENT);
2897     }
2898 
2899     public boolean isText(DocTree doctree) {
2900         return isKind(doctree, TEXT);
2901     }
2902 
2903     public boolean isThrows(DocTree doctree) {
2904         return isKind(doctree, THROWS);
2905     }
2906 
2907     public boolean isUnknownBlockTag(DocTree doctree) {
2908         return isKind(doctree, UNKNOWN_BLOCK_TAG);
2909     }
2910 
2911     public boolean isUnknownInlineTag(DocTree doctree) {
2912         return isKind(doctree, UNKNOWN_INLINE_TAG);
2913     }
2914 
2915     public boolean isValue(DocTree doctree) {
2916         return isKind(doctree, Kind.VALUE);
2917     }
2918 
2919     public boolean isVersion(DocTree doctree) {
2920         return isKind(doctree, VERSION);
2921     }
2922 
2923     private boolean isKind(DocTree doctree, DocTree.Kind match) {
2924         return  doctree.getKind() == match;
2925     }
2926 
2927     private final WeakSoftHashMap wksMap = new WeakSoftHashMap(this);
2928 
2929     public CommentHelper getCommentHelper(Element element) {
2930         return wksMap.computeIfAbsent(element);
2931     }
2932 
2933     public void removeCommentHelper(Element element) {
2934         wksMap.remove(element);
2935     }
2936 


< prev index next >