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 theXyzProperty
. Called 'property type'T
- Type of theXyz
, that the property attaches to. Called 'target type'
- Direct Known Subclasses:
NodePropertyDescriptor
,ToolPropertyDescriptor
public abstract class PropertyDescriptor<P extends Describable<P>,T> extends Descriptor<P>
BaseDescriptor
type used forXyzProperty
classes.- Since:
- 1.305
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PropertyDescriptor()
protected
PropertyDescriptor(Class<? extends P> clazz)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <D extends PropertyDescriptor<?,T>,T>
List<D>for_(List<D> all, Class<? extends T> target)
static <D extends PropertyDescriptor<?,T>,T>
List<D>for_(List<D> all, T target)
boolean
isApplicable(Class<? extends T> targetType)
Returns true if this property type is applicable to the given target type.-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
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)
-
-