/** * A method reference is compilable if it has been resolved to a reflectively accessible method * and the child nodes (arguments to the method) are also compilable. */ @Override public boolean isCompilable() { CachedMethodExecutor executorToCheck = this.cachedExecutor; if (executorToCheck == null || executorToCheck.hasProxyTarget() || !(executorToCheck.get() instanceof ReflectiveMethodExecutor)) { return false; } for (SpelNodeImpl child : this.children) { if (!child.isCompilable()) { return false; } } ReflectiveMethodExecutor executor = (ReflectiveMethodExecutor) executorToCheck.get(); if (executor.didArgumentConversionOccur()) { return false; } Class<?> clazz = executor.getMethod().getDeclaringClass(); if (!Modifier.isPublic(clazz.getModifiers()) && executor.getPublicDeclaringClass() == null) { return false; } return true; }
/** * A method reference is compilable if it has been resolved to a reflectively accessible method * and the child nodes (arguments to the method) are also compilable. */ @Override public boolean isCompilable() { CachedMethodExecutor executorToCheck = this.cachedExecutor; if (executorToCheck == null || executorToCheck.hasProxyTarget() || !(executorToCheck.get() instanceof ReflectiveMethodExecutor)) { return false; } for (SpelNodeImpl child : this.children) { if (!child.isCompilable()) { return false; } } ReflectiveMethodExecutor executor = (ReflectiveMethodExecutor) executorToCheck.get(); if (executor.didArgumentConversionOccur()) { return false; } Class<?> clazz = executor.getMethod().getDeclaringClass(); if (!Modifier.isPublic(clazz.getModifiers()) && executor.getPublicDeclaringClass() == null) { return false; } return true; }
/** * A method reference is compilable if it has been resolved to a reflectively accessible method * and the child nodes (arguments to the method) are also compilable. */ @Override public boolean isCompilable() { CachedMethodExecutor executorToCheck = this.cachedExecutor; if (executorToCheck == null || executorToCheck.hasProxyTarget() || !(executorToCheck.get() instanceof ReflectiveMethodExecutor)) { return false; } for (SpelNodeImpl child : this.children) { if (!child.isCompilable()) { return false; } } ReflectiveMethodExecutor executor = (ReflectiveMethodExecutor) executorToCheck.get(); if (executor.didArgumentConversionOccur()) { return false; } Class<?> clazz = executor.getMethod().getDeclaringClass(); if (!Modifier.isPublic(clazz.getModifiers()) && executor.getPublicDeclaringClass() == null) { return false; } return true; }