Package hudson.cli.declarative
Class CLIRegisterer
java.lang.Object
hudson.ExtensionFinder
hudson.cli.declarative.CLIRegisterer
- All Implemented Interfaces:
ExtensionPoint
Discover
CLIMethods and register them as CLICommand implementations.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.ExtensionFinder
ExtensionFinder.DefaultGuiceExtensionAnnotation, ExtensionFinder.GuiceExtensionAnnotation<T extends Annotation>, ExtensionFinder.GuiceFinder, ExtensionFinder.SezpozNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Collection<ExtensionComponent<T>> Discover extensions of the given type.refresh()Rebuilds the internal index, if any, so that futureExtensionFinder.find(Class, Hudson)calls will discover components newly added toPluginManager.uberClassLoader.Methods inherited from class hudson.ExtensionFinder
_find, findExtensions, isRefreshable, scout
-
Constructor Details
-
CLIRegisterer
public CLIRegisterer()
-
-
Method Details
-
refresh
Description copied from class:ExtensionFinderRebuilds the internal index, if any, so that futureExtensionFinder.find(Class, Hudson)calls will discover components newly added toPluginManager.uberClassLoader.The point of the refresh operation is not to disrupt instances of already loaded
ExtensionComponents, and only instantiate those that are new. Otherwise this will break the singleton semantics of various objects, such asDescriptors.The behaviour is undefined if
ExtensionFinder.isRefreshable()is returning false.- Specified by:
refreshin classExtensionFinder- Returns:
- never null
- Throws:
ExtensionRefreshException- See Also:
-
find
Description copied from class:ExtensionFinderDiscover extensions of the given type.This method is called only once per the given type after all the plugins are loaded, so implementations need not worry about caching.
This method should return all the known components at the time of the call, including those that are discovered later via
ExtensionFinder.refresh(), even though those components are separately returned inExtensionComponentSet.- Specified by:
findin classExtensionFinder- Type Parameters:
T- The type of the extension points. This is not bound toExtensionPointbecause ofDescriptor, which by itself doesn't implementExtensionPointfor a historical reason.- Parameters:
jenkins- Jenkins whose behalf this extension finder is performing lookup.- Returns:
- Can be empty but never null.
-