< prev index next >

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

Print this page

        

@@ -211,10 +211,21 @@
             }
         }
         return null;
     }
 
+    public ExecutableElement findAccessorFor(VariableElement field, DocTree.Kind kind) {
+        switch (kind) {
+            case GETTER:
+                return elementUtils.getterFor(field);
+            case SETTER:
+                return elementUtils.setterFor(field);
+            default:
+                throw new IllegalStateException("Cannot get here!");
+        }
+    }
+
     /**
      * Test whether a class is a subclass of another class.
      *
      * @param t1 the candidate superclass.
      * @param t2 the target
< prev index next >