package jenkins.python.expoint; import hudson.DescriptorExtensionList; import hudson.EnvVars; import hudson.Extension; import hudson.ExtensionPoint; import hudson.diagnosis.OldDataMonitor; import hudson.model.*; import hudson.slaves.NodeSpecific; import hudson.util.DescribableList; import hudson.util.StreamTaskListener; import hudson.util.XStream2; import java.io.Serializable; import java.io.IOException; import java.util.List; import com.thoughtworks.xstream.annotations.XStreamSerializable; import com.thoughtworks.xstream.converters.UnmarshallingContext; import jenkins.model.Jenkins; import hudson.tools.*; import hudson.tools.ToolInstallation.*; 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.tools.ToolInstallation */ public abstract class ToolInstallationPW extends ToolInstallation { 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[9]; functions[0] = "get_name"; functions[1] = "get_home"; functions[2] = "build_env_vars"; functions[3] = "get_properties"; functions[4] = "translate"; functions[5] = "translate"; functions[6] = "translate_for"; functions[7] = "read_resolve"; functions[8] = "get_descriptor"; int[] argsCount = new int[9]; argsCount[0] = 0; argsCount[1] = 0; argsCount[2] = 1; argsCount[3] = 0; argsCount[4] = 3; argsCount[5] = 2; argsCount[6] = 2; argsCount[7] = 0; argsCount[8] = 0; pexec.registerFunctions(functions, argsCount); } } public ToolInstallationPW(String name, String home) { super(name, home); } public ToolInstallationPW(String name, String home, List<? extends ToolProperty<?>> properties) { super(name, home, properties); } @Override public String getName() { initPython(); if (pexec.isImplemented(0)) { return (String) pexec.execPython("get_name"); } else { return super.getName(); } } @Override public String getHome() { initPython(); if (pexec.isImplemented(1)) { return (String) pexec.execPython("get_home"); } else { return super.getHome(); } } @Override public void buildEnvVars(EnvVars env) { initPython(); if (pexec.isImplemented(2)) { pexec.execPythonVoid("build_env_vars", env); } else { super.buildEnvVars(env); } } @Override public DescribableList<ToolProperty<?>, ToolPropertyDescriptor> getProperties() { initPython(); if (pexec.isImplemented(3)) { return (DescribableList) pexec.execPython("get_properties"); } else { return super.getProperties(); } } @Override public ToolInstallation translate(Node node, EnvVars envs, TaskListener listener) throws IOException, InterruptedException { initPython(); if (pexec.isImplemented(4)) { return (ToolInstallation) pexec.execPython("translate", node, envs, listener); } else { return super.translate(node, envs, listener); } } @Override public ToolInstallation translate(AbstractBuild<?, ?> buildInProgress, TaskListener listener) throws IOException, InterruptedException { initPython(); if (pexec.isImplemented(5)) { return (ToolInstallation) pexec.execPython("translate", buildInProgress, listener); } else { return super.translate(buildInProgress, listener); } } @Override public @SuppressWarnings("deprecation") String translateFor(Node node, TaskListener log) throws IOException, InterruptedException { initPython(); if (pexec.isImplemented(6)) { return (String) pexec.execPython("translate_for", node, log); } else { return super.translateFor(node, log); } } @Override public Object readResolve() { initPython(); if (pexec.isImplemented(7)) { return (Object) pexec.execPython("read_resolve"); } else { return super.readResolve(); } } @Override public Descriptor<ToolInstallation> getDescriptor() { initPython(); if (pexec.isImplemented(8)) { return (Descriptor) pexec.execPython("get_descriptor"); } else { return super.getDescriptor(); } } public String superGetName() { return super.getName(); } public String superGetHome() { return super.getHome(); } public void superBuildEnvVars(EnvVars env) { super.buildEnvVars(env); } public DescribableList<ToolProperty<?>, ToolPropertyDescriptor> superGetProperties() { return super.getProperties(); } public ToolInstallation superTranslate(Node node, EnvVars envs, TaskListener listener) throws IOException, InterruptedException { return super.translate(node, envs, listener); } public ToolInstallation superTranslate(AbstractBuild<?, ?> buildInProgress, TaskListener listener) throws IOException, InterruptedException { return super.translate(buildInProgress, listener); } public String superTranslateFor(Node node, TaskListener log) throws IOException, InterruptedException { return super.translateFor(node, log); } public Object superReadResolve() { return super.readResolve(); } public Descriptor<ToolInstallation> 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); } }