private void updateExitTypeDescriptor() { CachedMethodExecutor executorToCheck = this.cachedExecutor; if (executorToCheck != null && executorToCheck.get() instanceof ReflectiveMethodExecutor) { Method method = ((ReflectiveMethodExecutor) executorToCheck.get()).getMethod(); String descriptor = CodeFlow.toDescriptor(method.getReturnType()); if (this.nullSafe && CodeFlow.isPrimitive(descriptor)) { this.originalPrimitiveExitTypeDescriptor = descriptor; this.exitTypeDescriptor = CodeFlow.toBoxedDescriptor(descriptor); } else { this.exitTypeDescriptor = descriptor; } } }
/** * 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; }
Method method = methodExecutor.getMethod(); boolean isStaticMethod = Modifier.isStatic(method.getModifiers()); String descriptor = cf.lastDescriptor();
private void updateExitTypeDescriptor() { CachedMethodExecutor executorToCheck = this.cachedExecutor; if (executorToCheck != null && executorToCheck.get() instanceof ReflectiveMethodExecutor) { Method method = ((ReflectiveMethodExecutor) executorToCheck.get()).getMethod(); String descriptor = CodeFlow.toDescriptor(method.getReturnType()); if (this.nullSafe && CodeFlow.isPrimitive(descriptor)) { this.originalPrimitiveExitTypeDescriptor = descriptor; this.exitTypeDescriptor = CodeFlow.toBoxedDescriptor(descriptor); } else { this.exitTypeDescriptor = descriptor; } } }
/** * 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; }
Method method = methodExecutor.getMethod(); boolean isStaticMethod = Modifier.isStatic(method.getModifiers()); String descriptor = cf.lastDescriptor();
public OmitAnnotationsMethodExecutor(ReflectiveMethodExecutor original) { super(original.getMethod()); this.method = original.getMethod(); if (method.isVarArgs()) { Class<?>[] paramTypes = method.getParameterTypes(); this.varargsPosition = paramTypes.length - 1; } else { this.varargsPosition = null; } }
private void updateExitTypeDescriptor() { CachedMethodExecutor executorToCheck = this.cachedExecutor; if (executorToCheck != null && executorToCheck.get() instanceof ReflectiveMethodExecutor) { Method method = ((ReflectiveMethodExecutor) executorToCheck.get()).getMethod(); String descriptor = CodeFlow.toDescriptor(method.getReturnType()); if (this.nullSafe && CodeFlow.isPrimitive(descriptor)) { this.originalPrimitiveExitTypeDescriptor = descriptor; this.exitTypeDescriptor = CodeFlow.toBoxedDescriptor(descriptor); } else { this.exitTypeDescriptor = descriptor; } } }
/** * 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; }
Method method = methodExecutor.getMethod(); boolean isStaticMethod = Modifier.isStatic(method.getModifiers()); String descriptor = cf.lastDescriptor();