private static boolean isExecutable(Element element) {
    return element.getKind() == METHOD || element.getKind() == CONSTRUCTOR;
  }
Returns the nearest enclosing {@link TypeElement} to the current element, throwing an {@link
IllegalArgumentException} if the provided {@link Element} is not enclosed by a type.
common/src/main/java/com/google/auto/common/BasicAnnotationProcessor.java