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

changeset 1559
01af1b5c631d
parent 1501
8b749558767b
child 1645
97f6839673d6
equal deleted inserted replaced
1558:60caf53b98e2 1559:01af1b5c631d
758 758
759 public Name getName(CharSequence cs) { 759 public Name getName(CharSequence cs) {
760 return names.fromString(cs.toString()); 760 return names.fromString(cs.toString());
761 } 761 }
762 762
763 @Override
764 public boolean isFunctionalInterface(TypeElement element) {
765 if (element.getKind() != ElementKind.INTERFACE)
766 return false;
767 else {
768 TypeSymbol tsym = cast(TypeSymbol.class, element);
769 return types.isFunctionalInterface(tsym);
770 }
771 }
772
763 /** 773 /**
764 * Returns the tree node and compilation unit corresponding to this 774 * Returns the tree node and compilation unit corresponding to this
765 * element, or null if they can't be found. 775 * element, or null if they can't be found.
766 */ 776 */
767 private Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel(Element e) { 777 private Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel(Element e) {

mercurial