src/share/classes/com/sun/tools/javac/model/JavacElements.java

Print this page

        

@@ -758,10 +758,20 @@
 
     public Name getName(CharSequence cs) {
         return names.fromString(cs.toString());
     }
 
+    @Override
+    public boolean isFunctionalInterface(TypeElement element) {
+        if (element.getKind() != ElementKind.INTERFACE)
+            return false;
+        else {
+            TypeSymbol tsym = cast(TypeSymbol.class, element);
+            return types.isFunctionalInterface(tsym);
+        }
+    }
+
     /**
      * Returns the tree node and compilation unit corresponding to this
      * element, or null if they can't be found.
      */
     private Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel(Element e) {