Package hudson
Class ExtensionComponent<T>
- java.lang.Object
-
- hudson.ExtensionComponent<T>
-
- All Implemented Interfaces:
Comparable<ExtensionComponent<T>>
public class ExtensionComponent<T> extends Object implements Comparable<ExtensionComponent<T>>
DiscoveredExtension
object with a bit of metadata for Hudson. This is a plain value object.- Since:
- 1.356
- Author:
- Kohsuke Kawaguchi
- See Also:
ExtensionFinder
,ExtensionFilter
-
-
Constructor Summary
Constructors Constructor Description ExtensionComponent(T instance)
ExtensionComponent(T instance, double ordinal)
ExtensionComponent(T instance, Extension annotation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ExtensionComponent<T> that)
SortExtensionComponent
s in the descending order ofordinal()
.T
getInstance()
The instance of the discovered extension.boolean
isDescriptorOf(Class<? extends Describable> c)
Checks if this component is aDescriptor
describing the given type For example,component.isDescriptorOf(Builder.class)
double
ordinal()
SeeExtension.ordinal()
.
-
-
-
Method Detail
-
ordinal
public double ordinal()
SeeExtension.ordinal()
. Used to sort extensions.
-
getInstance
public T getInstance()
The instance of the discovered extension.- Returns:
- never null.
-
isDescriptorOf
public boolean isDescriptorOf(Class<? extends Describable> c)
Checks if this component is aDescriptor
describing the given type For example,component.isDescriptorOf(Builder.class)
-
compareTo
public int compareTo(ExtensionComponent<T> that)
SortExtensionComponent
s in the descending order ofordinal()
.- Specified by:
compareTo
in interfaceComparable<T>
-
-