boolean chainedThisConstructorCall = false; ConstructorCallExpression cce = null; if (ctor.firstStatementIsSpecialConstructorCall()) { Statement code = ctor.getFirstStatement(); cce = (ConstructorCallExpression) ((ExpressionStatement) code).getExpression();
if (isConstructor && (code == null || !((ConstructorNode) node).firstStatementIsSpecialConstructorCall())) { boolean hasCallToSuper = false; if (code!=null && controller.getClassNode() instanceof InnerClassNode) {
private void visitStdMethod(MethodNode node, boolean isConstructor, Parameter[] parameters, Statement code) { if (isConstructor && (code == null || !((ConstructorNode) node).firstStatementIsSpecialConstructorCall())) { // invokes the super class constructor mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKESPECIAL, BytecodeHelper.getClassInternalName(classNode.getSuperClass()), "<init>", "()V"); } compileStack.init(node.getVariableScope(), parameters, mv, classNode); if (isNotClinit()) { mv.visitMethodInsn(INVOKESTATIC,internalClassName,"$getCallSiteArray","()[Lorg/codehaus/groovy/runtime/callsite/CallSite;"); callSiteArrayVarIndex = compileStack.defineTemporaryVariable("$local$callSiteArray", ClassHelper.make(CallSite[].class), true); } // handle body super.visitConstructorOrMethod(node, isConstructor); if (!outputReturn || node.isVoidMethod()) { mv.visitInsn(RETURN); } compileStack.clear(); final Label finallyStart = new Label(); mv.visitJumpInsn(GOTO, finallyStart); // let's do all the exception blocks for (Iterator iter = exceptionBlocks.iterator(); iter.hasNext();) { Runnable runnable = (Runnable) iter.next(); runnable.run(); } exceptionBlocks.clear(); }
private void visitStdMethod(MethodNode node, boolean isConstructor, Parameter[] parameters, Statement code) { if (isConstructor && (code == null || !((ConstructorNode) node).firstStatementIsSpecialConstructorCall())) { // invokes the super class constructor mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKESPECIAL, BytecodeHelper.getClassInternalName(classNode.getSuperClass()), "<init>", "()V"); } compileStack.init(node.getVariableScope(), parameters, mv, classNode); if (isNotClinit()) { mv.visitMethodInsn(INVOKESTATIC,internalClassName,"$getCallSiteArray","()[Lorg/codehaus/groovy/runtime/callsite/CallSite;"); callSiteArrayVarIndex = compileStack.defineTemporaryVariable("$local$callSiteArray", ClassHelper.make(CallSite[].class), true); } // handle body super.visitConstructorOrMethod(node, isConstructor); if (!outputReturn || node.isVoidMethod()) { mv.visitInsn(RETURN); } compileStack.clear(); final Label finallyStart = new Label(); mv.visitJumpInsn(GOTO, finallyStart); // let's do all the exception blocks for (Iterator iter = exceptionBlocks.iterator(); iter.hasNext();) { Runnable runnable = (Runnable) iter.next(); runnable.run(); } exceptionBlocks.clear(); }
if (ctor.firstStatementIsSpecialConstructorCall()) continue;
if (ctor.firstStatementIsSpecialConstructorCall()) continue;
if (ctor.firstStatementIsSpecialConstructorCall()) continue;
Statement code = node.getCode(); if (isConstructor && (code == null || !((ConstructorNode) node).firstStatementIsSpecialConstructorCall())) {
private void transformConstructor(ConstructorNode ctor) { boolean chainedThisConstructorCall = false; ConstructorCallExpression cce = null; if (ctor.firstStatementIsSpecialConstructorCall()) { Statement code = ctor.getFirstStatement(); cce = (ConstructorCallExpression) ((ExpressionStatement) code).getExpression();
private void visitStdMethod(MethodNode node, boolean isConstructor, Parameter[] parameters, Statement code) { MethodVisitor mv = controller.getMethodVisitor(); final ClassNode superClass = controller.getClassNode().getSuperClass(); if (isConstructor && (code == null || !((ConstructorNode) node).firstStatementIsSpecialConstructorCall())) { boolean hasCallToSuper = false; if (code!=null && controller.getClassNode() instanceof InnerClassNode) {