protected void objectInit(AST init) { BlockStatement code = (BlockStatement) statementList(init); classNode.addObjectInitializerStatements(code); }
private void addInitContextClassLoaderIfNeeded(ClassNode classNode) { if (initContextClassLoader) { Statement initStatement = stmt(callX( callX(THREAD_CLASSNODE, "currentThread"), "setContextClassLoader", callX(callThisX("getClass"), "getClassLoader") ) ); classNode.addObjectInitializerStatements(initStatement); } }
Statement stmt = stmt(assignX(varX(fieldNode.getName(), fieldNode.getType()), mce)); if (isStatic == 0) { cNode.addObjectInitializerStatements(stmt); } else { List<Statement> staticStatements = new ArrayList<Statement>(); cNode.addObjectInitializerStatements(new ExpressionStatement( new MethodCallExpression( new ClassExpression(helperClassNode),
protected void objectInit(AST init) { BlockStatement code = (BlockStatement) statementList(init); classNode.addObjectInitializerStatements(code); }
protected void objectInit(AST init) { BlockStatement code = (BlockStatement) statementList(init); classNode.addObjectInitializerStatements(code); }
protected void objectInit(AST init) { BlockStatement code = (BlockStatement) statementList(init); classNode.addObjectInitializerStatements(code); }
protected void objectInit(AST init) { BlockStatement code = (BlockStatement) statementList(init); classNode.addObjectInitializerStatements(code); }
private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) { BlockStatement body = new BlockStatement(); body.addStatement(stmnt( call( call(THIS, propertyName + "Property", NO_ARGS), "addListener", args ) )); classNode.addObjectInitializerStatements(body); }
private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) { BlockStatement body = new BlockStatement(); body.addStatement(stmnt( call( call(THIS, propertyName + "Property", NO_ARGS), "addListener", args ) )); classNode.addObjectInitializerStatements(body); }
private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) { BlockStatement body = new BlockStatement(); body.addStatement(stmnt( call( call(THIS, propertyName + "Property", NO_ARGS), "addListener", args ) )); classNode.addObjectInitializerStatements(body); }
private static void addListenerStatement(ClassNode classNode, ArgumentListExpression args) { BlockStatement body = new BlockStatement(); body.addStatement(new ExpressionStatement( new MethodCallExpression( VariableExpression.THIS_EXPRESSION, "addPropertyChangeListener", args ) )); classNode.addObjectInitializerStatements(body); } }
private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) { BlockStatement body = new BlockStatement(); body.addStatement(stmnt( call( call(THIS, propertyName + "Property", NO_ARGS), "addListener", args ) )); classNode.addObjectInitializerStatements(body); }
private void addInitContextClassLoaderIfNeeded(ClassNode classNode) { if (initContextClassLoader) { Statement initStatement = new ExpressionStatement( new MethodCallExpression( new StaticMethodCallExpression(THREAD_CLASSNODE, "currentThread", ArgumentListExpression.EMPTY_ARGUMENTS), "setContextClassLoader", new MethodCallExpression( new MethodCallExpression(VariableExpression.THIS_EXPRESSION, "getClass", MethodCallExpression.NO_ARGUMENTS), "getClassLoader", ArgumentListExpression.EMPTY_ARGUMENTS ) ) ); classNode.addObjectInitializerStatements(initStatement); } }