public static JCMethodDecl findFirstMethodDeclaration(JCClassDecl typeDeclaration, String methodName) { return findMethodDeclarations(typeDeclaration).stream() // .filter(methodDecl -> methodDecl.getName().toString().equals(methodName)) // .findFirst().orElse(null); }
replacedBody = BASE_INDENT_MARKER.matcher(replacedBody).replaceAll(getIndentString()); replacedBody = INDENT_MARKER.matcher(replacedBody).replaceAll(INDENT); replacedBody = METHOD_NAME_MARKER.matcher(replacedBody).replaceAll(method.getName().toString()); replacedBody = CLASS_NAME_MARKER.matcher(replacedBody) .replaceAll(method.sym.getEnclosingElement().getQualifiedName().toString());
entry.getValue().getName().toString(), (MethodType) entry.getValue().type); if (s == null || s == entry.getValue().sym) { getAdapter().typeVariablesToErase
String name = md.getName().toString(); JCTree.JCModifiers modifiers = md.getModifiers(); final String methodModifier = parseModifiers(context, modifiers);
final Name proxyMethodName = idents.nextMethId( md.getName() ); utils.createMethod( cd, pos, (mdFlags & Flags.STATIC) | Flags.PRIVATE, proxyMethodName,
if (JSweetConfig.INDEXED_GET_FUCTION_NAME.equals(methodDecl.getName().toString()) && methodDecl.getParameters().size() == 1) { print("[").print(methodDecl.getParameters().head).print("]: "); ClassType superClassType = (ClassType) parent.getExtendsClause().type; MethodSymbol superMethod = Util.findMethodDeclarationInType(context.types, superClassType.tsym, methodDecl.getName().toString(), (MethodType) methodDecl.type); if (superMethod != null) { return; if (!overload.printed && !addCoreMethod && overload.coreMethod.type instanceof MethodType) { addCoreMethod = Util.findMethodDeclarationInType(context.types, parent.sym, methodDecl.getName().toString(), (MethodType) overload.coreMethod.type) == null; print("return "); print("__debug_exec('" + parent.sym.getQualifiedName() + "', '" + methodDecl.getName() + "', "); if (!methodDecl.params.isEmpty()) { print("["); replacedBody = INDENT_MARKER.matcher(replacedBody).replaceAll(INDENT); replacedBody = METHOD_NAME_MARKER.matcher(replacedBody) .replaceAll(methodDecl.getName().toString()); replacedBody = CLASS_NAME_MARKER.matcher(replacedBody) .replaceAll(parent.sym.getQualifiedName().toString());
JCMethodDecl method = (JCMethodDecl) m; if (!method.sym.isConstructor()) { printIndent().print(method.getName() + ": ("); for (JCVariableDecl param : method.getParameters()) { print(param.getName() + ", ");