package jenkins.python.expoint; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.inject.AbstractModule; import com.google.inject.Binding; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.Provider; import com.google.inject.Scope; import com.google.inject.Scopes; import com.google.inject.name.Names; import com.google.common.collect.ImmutableList; import hudson.init.InitMilestone; import hudson.model.Descriptor; import hudson.model.Hudson; import jenkins.ExtensionComponentSet; import jenkins.ExtensionFilter; import jenkins.ExtensionRefreshException; import jenkins.ProxyInjector; import jenkins.model.Jenkins; import net.java.sezpoz.Index; import net.java.sezpoz.IndexItem; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.NoExternalUse; import java.lang.annotation.Annotation; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.logging.Logger; import java.util.logging.Level; import java.util.List; import java.util.ArrayList; import java.util.Collection; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; import java.lang.reflect.Method; import hudson.*; import hudson.ExtensionFinder.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see hudson.ExtensionFinder */ public abstract class ExtensionFinderPW extends ExtensionFinder { private transient PythonExecutor pexec; private void initPython() { if (pexec == null) { pexec = new PythonExecutor(this); String[] jMethods = new String[2]; jMethods[0] = "refresh"; jMethods[1] = "find"; String[] pFuncs = new String[2]; pFuncs[0] = "refresh"; pFuncs[1] = "find"; Class[][] argTypes = new Class[2][]; argTypes[0] = new Class[0]; argTypes[1] = new Class[2]; argTypes[1][0] = Class.class; argTypes[1][1] = Hudson.class; pexec.checkAbstrMethods(jMethods, pFuncs, argTypes); String[] functions = new String[4]; functions[0] = "find_extensions"; functions[1] = "is_refreshable"; functions[2] = "_find"; functions[3] = "scout"; int[] argsCount = new int[4]; argsCount[0] = 2; argsCount[1] = 0; argsCount[2] = 2; argsCount[3] = 2; pexec.registerFunctions(functions, argsCount); } } @Override public ExtensionComponentSet refresh() throws ExtensionRefreshException { initPython(); return (ExtensionComponentSet) pexec.execPython("refresh"); } @Override public <T> Collection<ExtensionComponent<T>> find(Class<T> type, Hudson jenkins) { initPython(); return (Collection) pexec.execPython("find", type, jenkins); } @Override public <T> Collection<T> findExtensions(Class<T> type, Hudson hudson) { initPython(); return (Collection) pexec.execPython("find_extensions", type, hudson); } @Override public boolean isRefreshable() { initPython(); if (pexec.isImplemented(1)) { return pexec.execPythonBool("is_refreshable"); } else { return super.isRefreshable(); } } @Override public <T> Collection<ExtensionComponent<T>> _find(Class<T> type, Hudson hudson) { initPython(); if (pexec.isImplemented(2)) { return (Collection) pexec.execPython("_find", type, hudson); } else { return super._find(type, hudson); } } @Override public void scout(Class extensionType, Hudson hudson) { initPython(); if (pexec.isImplemented(3)) { pexec.execPythonVoid("scout", extensionType, hudson); } else { super.scout(extensionType, hudson); } } public boolean superIsRefreshable() { return super.isRefreshable(); } public <T> Collection<ExtensionComponent<T>> super_find(Class<T> type, Hudson hudson) { return super._find(type, hudson); } public void superScout(Class extensionType, Hudson hudson) { super.scout(extensionType, hudson); } 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); } }