public String formatInterfaces(SClassDeclIR classDecl) { LinkedList<AInterfaceDeclIR> interfaces = classDecl.getInterfaces(); if (interfaces == null) { return ""; } List<String> interfaceNames = new LinkedList<>(); for(AInterfaceDeclIR i : interfaces) { interfaceNames.add(i.getName()); } return formatInterfaceNames(interfaceNames, "implements"); }
public String format(AMethodTypeIR methodType) throws AnalysisException { final String OBJ = "Object"; if (funcValAssist == null) { return OBJ; } AInterfaceDeclIR methodTypeInterface = funcValAssist.findInterface(methodType); if (methodTypeInterface == null) { return OBJ; // Should not happen } AInterfaceTypeIR methodClass = new AInterfaceTypeIR(); methodClass.setName(methodTypeInterface.getName()); LinkedList<STypeIR> params = methodType.getParams(); for (STypeIR param : params) { methodClass.getTypes().add(param.clone()); } methodClass.getTypes().add(methodType.getResult().clone()); return methodClass != null ? format(methodClass) : OBJ; }
classType.setName(lambdaInterface.getName());
funcValueInterface.apply(javaFormat.getMergeVisitor(), writer); String formattedJavaCode = JavaCodeGenUtil.formatJavaCode(writer.toString()); genModules.add(new GeneratedModule(funcValueInterface.getName(), funcValueInterface, formattedJavaCode, false)); + funcValueInterface.getName() + ": " + e.getMessage()); log.error("Skipping interface.."); e.printStackTrace();