--- old/src/java.compiler/share/classes/javax/lang/model/util/Elements.java 2016-08-18 18:54:56.854716553 -0700
+++ new/src/java.compiler/share/classes/javax/lang/model/util/Elements.java 2016-08-18 18:54:56.758716548 -0700
@@ -29,6 +29,7 @@
import java.util.List;
import java.util.Map;
+import javax.lang.model.AnnotatedConstruct;
import javax.lang.model.element.*;
@@ -136,6 +137,83 @@
boolean isDeprecated(Element e);
/**
+ * Returns {@code true} if the element is mandated, {@code false} otherwise.
+ *
+ * A mandated construct is not explicitly declared in the source
+ * code, but its presence is mandated by the specification to be
+ * implicitly declared. One example of a mandated construct is a
+ * default constructor in a class that contains no
+ * constructor declarations.
+ *
+ * @implSpec The default implementation of this method returns {@code false}.
+ *
+ * @param e the element being examined
+ * @return {@code true} if the element is mandated, {@code false} otherwise
+ * @jls 8.8.9 Default Constructor
+ * @jls 13.1. The Form of a Binary
+ * @since 9
+ */
+ default boolean isMandated(Element e) {
+ return false;
+ }
+
+ /**
+ * Returns {@code true} if the annotation mirror is mandated,
+ * {@code false} otherwise.
+ *
+ * A mandated construct is not explicitly declared in the source
+ * code, but its presence is mandated by the specification to be
+ * implicitly declared. One example of a mandated construct is the
+ * implicitly declared container annotation used to hold
+ * repeated base annotations of a repeatable annotation type.
+ *
+ * @implSpec The default implementation of this method returns {@code false}.
+ *
+
+ * @param c the construct the annotation mirror modifies
+ * @param a the annotation mirror being examined
+ * @return {@code true} if the element is mandated, {@code false} otherwise
+ * @jls 9.6.3. Repeatable Annotation Types
+ * @jls 9.7.5 Multiple Annotations of the Same Type
+ * @since 9
+ */
+ default boolean isMandated(AnnotatedConstruct c, AnnotationMirror a) {
+ return false;
+ }
+
+ /**
+ * Returns {@code true} if the element is synthetic, {@code false} otherwise.
+ *
+ * A synthetic element corresponds to a construct neither
+ * implicitly nor explicitly declared in source code.
+ *
+ * @implSpec The default implementation of this method returns {@code false}.
+ *
+ * @param e the element being examined
+ * @return {@code true} if the element is synthetic, {@code false} otherwise
+ * @jls 13.1. The Form of a Binary
+ * @since 9
+ */
+ default boolean isSynthetic(Element e) {
+ return false;
+ }
+
+ /**
+ * Returns {@code true} if the executable element is a bridge
+ * method, {@code false} otherwise.
+ *
+ * @implSpec The default implementation of this method returns {@code false}.
+ *
+ * @param e the executable being examined
+ * @return {@code true} if the executable element is a bridge
+ * method, {@code false} otherwise
+ * @since 9
+ */
+ default boolean isBridge(ExecutableElement e) {
+ return false;
+ }
+
+ /**
* Returns the binary name of a type element.
*
* @param type the type element being examined