return new ReflectiveConstructorExecutor(ctor); return new ReflectiveConstructorExecutor(closeMatch); return new ReflectiveConstructorExecutor(matchRequiringConversion);
@Override public boolean isCompilable() { if (!(this.cachedExecutor instanceof ReflectiveConstructorExecutor) || this.exitTypeDescriptor == null) { return false; } if (getChildCount() > 1) { for (int c = 1, max = getChildCount();c < max; c++) { if (!this.children[c].isCompilable()) { return false; } } } ReflectiveConstructorExecutor executor = (ReflectiveConstructorExecutor) this.cachedExecutor; if (executor == null) { return false; } Constructor<?> constructor = executor.getConstructor(); return (Modifier.isPublic(constructor.getModifiers()) && Modifier.isPublic(constructor.getDeclaringClass().getModifiers())); }
@Override public void generateCode(MethodVisitor mv, CodeFlow cf) { ReflectiveConstructorExecutor executor = ((ReflectiveConstructorExecutor) this.cachedExecutor); Assert.state(executor != null, "No cached executor"); Constructor<?> constructor = executor.getConstructor(); String classDesc = constructor.getDeclaringClass().getName().replace('.', '/'); mv.visitTypeInsn(NEW, classDesc); mv.visitInsn(DUP); // children[0] is the type of the constructor, don't want to include that in argument processing SpelNodeImpl[] arguments = new SpelNodeImpl[this.children.length - 1]; System.arraycopy(this.children, 1, arguments, 0, this.children.length - 1); generateCodeForArguments(mv, cf, constructor, arguments); mv.visitMethodInsn(INVOKESPECIAL, classDesc, "<init>", CodeFlow.createSignatureDescriptor(constructor), false); cf.pushDescriptor(this.exitTypeDescriptor); }
return new ReflectiveConstructorExecutor(ctor); return new ReflectiveConstructorExecutor(closeMatch); return new ReflectiveConstructorExecutor(matchRequiringConversion);
@Override public boolean isCompilable() { if (!(this.cachedExecutor instanceof ReflectiveConstructorExecutor) || this.exitTypeDescriptor == null) { return false; } if (getChildCount() > 1) { for (int c = 1, max = getChildCount();c < max; c++) { if (!this.children[c].isCompilable()) { return false; } } } ReflectiveConstructorExecutor executor = (ReflectiveConstructorExecutor) this.cachedExecutor; if (executor == null) { return false; } Constructor<?> constructor = executor.getConstructor(); return (Modifier.isPublic(constructor.getModifiers()) && Modifier.isPublic(constructor.getDeclaringClass().getModifiers())); }
return new ReflectiveConstructorExecutor(ctor); return new ReflectiveConstructorExecutor(closeMatch); return new ReflectiveConstructorExecutor(matchRequiringConversion);
@Override public void generateCode(MethodVisitor mv, CodeFlow cf) { ReflectiveConstructorExecutor executor = ((ReflectiveConstructorExecutor) this.cachedExecutor); Assert.state(executor != null, "No cached executor"); Constructor<?> constructor = executor.getConstructor(); String classDesc = constructor.getDeclaringClass().getName().replace('.', '/'); mv.visitTypeInsn(NEW, classDesc); mv.visitInsn(DUP); // children[0] is the type of the constructor, don't want to include that in argument processing SpelNodeImpl[] arguments = new SpelNodeImpl[this.children.length - 1]; System.arraycopy(this.children, 1, arguments, 0, this.children.length - 1); generateCodeForArguments(mv, cf, constructor, arguments); mv.visitMethodInsn(INVOKESPECIAL, classDesc, "<init>", CodeFlow.createSignatureDescriptor(constructor), false); cf.pushDescriptor(this.exitTypeDescriptor); }
if (executorToUse instanceof ReflectiveConstructorExecutor) { this.exitTypeDescriptor = CodeFlow.toDescriptor( ((ReflectiveConstructorExecutor) executorToUse).getConstructor().getDeclaringClass());
if (executorToUse instanceof ReflectiveConstructorExecutor) { this.exitTypeDescriptor = CodeFlow.toDescriptor( ((ReflectiveConstructorExecutor) executorToUse).getConstructor().getDeclaringClass());
@Override public boolean isCompilable() { if (!(this.cachedExecutor instanceof ReflectiveConstructorExecutor) || this.exitTypeDescriptor == null) { return false; } if (getChildCount() > 1) { for (int c = 1, max = getChildCount();c < max; c++) { if (!this.children[c].isCompilable()) { return false; } } } ReflectiveConstructorExecutor executor = (ReflectiveConstructorExecutor) this.cachedExecutor; if (executor == null) { return false; } Constructor<?> constructor = executor.getConstructor(); return (Modifier.isPublic(constructor.getModifiers()) && Modifier.isPublic(constructor.getDeclaringClass().getModifiers())); }
@Override public void generateCode(MethodVisitor mv, CodeFlow cf) { ReflectiveConstructorExecutor executor = ((ReflectiveConstructorExecutor) this.cachedExecutor); Assert.state(executor != null, "No cached executor"); Constructor<?> constructor = executor.getConstructor(); String classDesc = constructor.getDeclaringClass().getName().replace('.', '/'); mv.visitTypeInsn(NEW, classDesc); mv.visitInsn(DUP); // children[0] is the type of the constructor, don't want to include that in argument processing SpelNodeImpl[] arguments = new SpelNodeImpl[this.children.length - 1]; System.arraycopy(this.children, 1, arguments, 0, this.children.length - 1); generateCodeForArguments(mv, cf, constructor, arguments); mv.visitMethodInsn(INVOKESPECIAL, classDesc, "<init>", CodeFlow.createSignatureDescriptor(constructor), false); cf.pushDescriptor(this.exitTypeDescriptor); }
if (executorToUse instanceof ReflectiveConstructorExecutor) { this.exitTypeDescriptor = CodeFlow.toDescriptor( ((ReflectiveConstructorExecutor) executorToUse).getConstructor().getDeclaringClass());