Variable var = program.createVariable();
ConstructInstruction construct = new ConstructInstruction();
construct.setReceiver(var);
construct.setType("com.sun.tools.javac.api.JavacTool");
block.getInstructions().add(construct);
InvokeInstruction init = new InvokeInstruction();
init.setInstance(var);
init.setType(InvocationType.SPECIAL);
init.setMethod(new MethodReference("com.sun.tools.javac.api.JavacTool", "<init>", ValueType.VOID));
block.getInstructions().add(init);
ExitInstruction exit = new ExitInstruction();
exit.setValueToReturn(var);
block.getInstructions().add(exit);
method.setProgram(program);