public void addMethods(final String path, final Collection<MethodAccess> methods) { /* Only add methods that could be REST endpoints. */ methods.stream().filter(methodAccess -> !methodAccess.isPrivate() && //No private methods !methodAccess.isStatic() && //No static methods !methodAccess.method().isSynthetic() && //No synthetic methods !methodAccess.method().getDeclaringClass().getName().contains("$$EnhancerByGuice$$") && !methodAccess.name().contains("$")) //No methods with $ as this could be Scala generated // method or byte code lib generated .forEach(methodAccess -> addMethod(path, methodAccess)); }
public boolean respondsTo(String methodName, Class<?>... types) { Iterable<MethodAccess> methods = this.methodsMulti.getAll(methodName); for (MethodAccess methodAccess : methods) { if (methodAccess.isStatic()) continue; if (methodAccess.respondsTo(types) ) { return true; }; } return false; }
public void addMethods(final String path, final Collection<MethodAccess> methods) { /* Only add methods that could be REST endpoints. */ methods.stream().filter(methodAccess -> !methodAccess.isPrivate() && //No private methods !methodAccess.isStatic() && //No static methods !methodAccess.method().isSynthetic() && //No synthetic methods !methodAccess.method().getDeclaringClass().getName().contains("$$EnhancerByGuice$$") && !methodAccess.name().contains("$")) //No methods with $ as this could be Scala generated // method or byte code lib generated .forEach(methodAccess -> addMethod(path, methodAccess)); }
public boolean respondsTo(String methodName, Object... args) { Iterable<MethodAccess> methods = this.methodsMulti.getAll(methodName); for (MethodAccess methodAccess : methods) { if (methodAccess.isStatic()) continue; if (methodAccess.respondsTo(args) ) { return true; }; } return false; }
public void addMethods(final String path, final Collection<MethodAccess> methods) { /* Only add methods that could be REST endpoints. */ methods.stream().filter(methodAccess -> !methodAccess.isPrivate() && //No private methods !methodAccess.isStatic() && //No static methods !methodAccess.method().isSynthetic() && //No synthetic methods !methodAccess.name().contains("$")) //No methods with $ as this could be Scala generated // method or byte code lib generated .forEach(methodAccess -> addMethod(path, methodAccess)); }
public boolean respondsTo(String methodName, Class<?>... types) { Iterable<MethodAccess> methods = this.methodsMulti.getAll(methodName); for (MethodAccess methodAccess : methods) { if (methodAccess.isStatic()) continue; if (methodAccess.respondsTo(types) ) { return true; }; } return false; }
public boolean respondsTo(String methodName, Object... args) { Iterable<MethodAccess> methods = this.methodsMulti.getAll(methodName); for (MethodAccess methodAccess : methods) { if (methodAccess.isStatic()) continue; if (methodAccess.respondsTo(args) ) { return true; }; } return false; }