Package hudson
Class ExtensionComponent<T>
java.lang.Object
hudson.ExtensionComponent<T>
- All Implemented Interfaces:
Comparable<ExtensionComponent<T>>
Discovered
Extension
object with a bit of metadata for Hudson.
This is a plain value object.- Since:
- 1.356
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
ConstructorDescriptionExtensionComponent
(T instance) ExtensionComponent
(T instance, double ordinal) ExtensionComponent
(T instance, Extension annotation) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ExtensionComponent<T> that) SortExtensionComponent
s in the descending order ofordinal()
.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()
.
-
Constructor Details
-
ExtensionComponent
-
ExtensionComponent
-
ExtensionComponent
-
-
Method Details
-
ordinal
public double ordinal()SeeExtension.ordinal()
. Used to sort extensions. -
getInstance
The instance of the discovered extension.- Returns:
- never null.
-
isDescriptorOf
Checks if this component is aDescriptor
describing the given type For example,component.isDescriptorOf(Builder.class)
-
compareTo
SortExtensionComponent
s in the descending order ofordinal()
.- Specified by:
compareTo
in interfaceComparable<T>
-