package jenkins.python.expoint; import hudson.ExtensionPoint; import hudson.matrix.MatrixBuild.MatrixBuildExecution; import hudson.model.AbstractDescribableImpl; import hudson.model.BuildListener; import hudson.model.Result; import java.io.IOException; import java.util.List; import hudson.matrix.*; import hudson.matrix.MatrixExecutionStrategy.*; import jenkins.model.Jenkins; import hudson.model.*; import hudson.model.AbstractDescribableImpl.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see hudson.matrix.MatrixExecutionStrategy */ public abstract class MatrixExecutionStrategyPW extends MatrixExecutionStrategy { private transient PythonExecutor pexec; private void initPython() { if (pexec == null) { pexec = new PythonExecutor(this); String[] jMethods = new String[0]; String[] pFuncs = new String[0]; Class[][] argTypes = new Class[0][]; pexec.checkAbstrMethods(jMethods, pFuncs, argTypes); String[] functions = new String[3]; functions[0] = "run"; functions[1] = "run"; functions[2] = "get_descriptor"; int[] argsCount = new int[3]; argsCount[0] = 1; argsCount[1] = 3; argsCount[2] = 0; pexec.registerFunctions(functions, argsCount); } } @Override public Result run(MatrixBuildExecution execution) throws InterruptedException, IOException { initPython(); if (pexec.isImplemented(0)) { return (Result) pexec.execPython("run", execution); } else { return super.run(execution); } } @Override public Result run(MatrixBuild build, List<MatrixAggregator> aggregators, BuildListener listener) throws InterruptedException, IOException { initPython(); if (pexec.isImplemented(1)) { return (Result) pexec.execPython("run", build, aggregators, listener); } else { return super.run(build, aggregators, listener); } } @Override public MatrixExecutionStrategyDescriptor getDescriptor() { initPython(); if (pexec.isImplemented(2)) { return (MatrixExecutionStrategyDescriptor) pexec.execPython("get_descriptor"); } else { return super.getDescriptor(); } } public Result superRun(MatrixBuildExecution execution) throws InterruptedException, IOException { return super.run(execution); } public Result superRun(MatrixBuild build, List<MatrixAggregator> aggregators, BuildListener listener) throws InterruptedException, IOException { return super.run(build, aggregators, listener); } public MatrixExecutionStrategyDescriptor superGetDescriptor() { return super.getDescriptor(); } public Object execPython(String function, Object... params) { initPython(); return pexec.execPython(function, params); } public byte execPythonByte(String function, Object... params) { initPython(); return pexec.execPythonByte(function, params); } public short execPythonShort(String function, Object... params) { initPython(); return pexec.execPythonShort(function, params); } public char execPythonChar(String function, Object... params) { initPython(); return pexec.execPythonChar(function, params); } public int execPythonInt(String function, Object... params) { initPython(); return pexec.execPythonInt(function, params); } public long execPythonLong(String function, Object... params) { initPython(); return pexec.execPythonLong(function, params); } public float execPythonFloat(String function, Object... params) { initPython(); return pexec.execPythonFloat(function, params); } public double execPythonDouble(String function, Object... params) { initPython(); return pexec.execPythonDouble(function, params); } public boolean execPythonBool(String function, Object... params) { initPython(); return pexec.execPythonBool(function, params); } public void execPythonVoid(String function, Object... params) { initPython(); pexec.execPythonVoid(function, params); } }