hudson.cli.declarative
Class CLIRegisterer
java.lang.Object
hudson.ExtensionFinder
hudson.cli.declarative.CLIRegisterer
- All Implemented Interfaces:
- ExtensionPoint
@Extension
public class CLIRegisterer
- extends ExtensionFinder
Discover CLIMethod
s and register them as CLICommand
implementations.
- Author:
- Kohsuke Kawaguchi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLIRegisterer
public CLIRegisterer()
refresh
public ExtensionComponentSet refresh()
throws ExtensionRefreshException
- Description copied from class:
ExtensionFinder
- Rebuilds the internal index, if any, so that future
ExtensionFinder.find(Class, Hudson)
calls
will discover components newly added to PluginManager.uberClassLoader
.
The point of the refresh operation is not to disrupt instances of already loaded ExtensionComponent
s,
and only instantiate those that are new. Otherwise this will break the singleton semantics of various
objects, such as Descriptor
s.
The behaviour is undefined if ExtensionFinder.isRefreshable()
is returning false.
- Specified by:
refresh
in class ExtensionFinder
- Returns:
- never null
- Throws:
ExtensionRefreshException
- See Also:
ExtensionFinder.isRefreshable()
find
public <T> Collection<ExtensionComponent<T>> find(Class<T> type,
Hudson jenkins)
- Description copied from class:
ExtensionFinder
- Discover 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 in ExtensionComponentSet
.
- Specified by:
find
in class ExtensionFinder
- Type Parameters:
T
- The type of the extension points. This is not bound to ExtensionPoint
because
of Descriptor
, which by itself doesn't implement ExtensionPoint
for
a historical reason.jenkins
- Jenkins whose behalf this extension finder is performing lookup.
- Returns:
- Can be empty but never null.
Copyright © 2004-2013. All Rights Reserved.