627 * and overrides its functional descriptor. This routine is used for two |
627 * and overrides its functional descriptor. This routine is used for two |
628 * main purposes: (i) checking well-formedness of a functional interface; |
628 * main purposes: (i) checking well-formedness of a functional interface; |
629 * (ii) perform functional interface bridge calculation. |
629 * (ii) perform functional interface bridge calculation. |
630 */ |
630 */ |
631 public ClassSymbol makeFunctionalInterfaceClass(Env<AttrContext> env, Name name, List<Type> targets, long cflags) { |
631 public ClassSymbol makeFunctionalInterfaceClass(Env<AttrContext> env, Name name, List<Type> targets, long cflags) { |
632 if (targets.isEmpty() || !isFunctionalInterface(targets.head)) { |
632 if (targets.isEmpty()) { |
633 return null; |
633 return null; |
634 } |
634 } |
635 Symbol descSym = findDescriptorSymbol(targets.head.tsym); |
635 Symbol descSym = findDescriptorSymbol(targets.head.tsym); |
636 Type descType = findDescriptorType(targets.head); |
636 Type descType = findDescriptorType(targets.head); |
637 ClassSymbol csym = new ClassSymbol(cflags, name, env.enclClass.sym.outermostClass()); |
637 ClassSymbol csym = new ClassSymbol(cflags, name, env.enclClass.sym.outermostClass()); |