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>>
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 Details

    • ExtensionComponent

      public ExtensionComponent(T instance, double ordinal)
    • ExtensionComponent

      public ExtensionComponent(T instance, Extension annotation)
    • ExtensionComponent

      public ExtensionComponent(T instance)
  • Method Details

    • ordinal

      public double ordinal()
      See Extension.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 a Descriptor describing the given type For example, component.isDescriptorOf(Builder.class)
    • compareTo

      public int compareTo(ExtensionComponent<T> that)
      Sort ExtensionComponents in the descending order of ordinal().
      Specified by:
      compareTo in interface Comparable<T>