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) { |