Package hudson.widgets
Class BuildHistoryWidget.FactoryImpl
- java.lang.Object
-
- jenkins.widgets.WidgetFactory<Job,BuildHistoryWidget>
-
- hudson.widgets.BuildHistoryWidget.FactoryImpl
-
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- BuildHistoryWidget<T>
@Extension @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @Symbol("buildHistory") public static final class BuildHistoryWidget.FactoryImpl extends WidgetFactory<Job,BuildHistoryWidget>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description FactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<BuildHistoryWidget>
createFor(Job target)
Creates widgets for a given object.Class<Job>
type()
The type of object this factory cares about.Class<BuildHistoryWidget>
widgetType()
A supertype of any widgets this factory might produce.-
Methods inherited from class jenkins.widgets.WidgetFactory
factoriesFor
-
-
-
-
Method Detail
-
type
public Class<Job> type()
Description copied from class:WidgetFactory
The type of object this factory cares about. Declared separately, rather than by havingWidgetFactory.createFor(T)
do a check-cast, so that method bodies are not loaded until actually needed.- Specified by:
type
in classWidgetFactory<Job,BuildHistoryWidget>
- Returns:
- the type of
WidgetFactory
-
widgetType
public Class<BuildHistoryWidget> widgetType()
Description copied from class:WidgetFactory
A supertype of any widgets this factory might produce. Defined so that factories which produce irrelevant widgets need not be consulted. If your implementation was returning multiple disparate kinds of widgets, it is best to split it into two factories.If an API defines an abstract
Widget
subtype, and you are providing a concrete implementation, you may return the API type here to delay class loading.- Specified by:
widgetType
in classWidgetFactory<Job,BuildHistoryWidget>
- Returns:
- a bound for the result of
WidgetFactory.createFor(T)
-
createFor
@NonNull public Collection<BuildHistoryWidget> createFor(@NonNull Job target)
Description copied from class:WidgetFactory
Creates widgets for a given object. This may be called frequently for the same object, so if your implementation is expensive, do your own caching.- Specified by:
createFor
in classWidgetFactory<Job,BuildHistoryWidget>
- Parameters:
target
- a widgetable object- Returns:
- a possible empty set of widgets (typically either using
Set.of()
).
-
-