Package hudson.tools

Class PropertyDescriptor<P extends Describable<P>,T>

java.lang.Object
hudson.model.Descriptor<P>
hudson.tools.PropertyDescriptor<P,T>
Type Parameters:
P - Type of the XyzProperty. Called 'property type'
T - Type of the Xyz, that the property attaches to. Called 'target type'
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Direct Known Subclasses:
NodePropertyDescriptor, ToolPropertyDescriptor

public abstract class PropertyDescriptor<P extends Describable<P>,T> extends Descriptor<P>
Base Descriptor type used for XyzProperty classes.
Since:
1.305
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • PropertyDescriptor

      protected PropertyDescriptor(Class<? extends P> clazz)
    • PropertyDescriptor

      protected PropertyDescriptor()
  • Method Details

    • isApplicable

      public boolean isApplicable(Class<? extends T> targetType)
      Returns true if this property type is applicable to the given target type.

      The default implementation of this method checks if the given node type is assignable according to the parameterization, but subtypes can extend this to change this behavior.

      Returns:
      true to indicate applicable, in which case the property will be displayed in the configuration screen of the target, for example.
    • for_

      public static <D extends PropertyDescriptor<?, T>, T> List<D> for_(List<D> all, Class<? extends T> target)
    • for_

      public static <D extends PropertyDescriptor<?, T>, T> List<D> for_(List<D> all, T target)