hudson.tools
Class PropertyDescriptor<P extends Describable<P>,T>

java.lang.Object
  extended by hudson.model.Descriptor<P>
      extended by 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
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

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
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
protected PropertyDescriptor()
           
protected PropertyDescriptor(Class<? extends P> clazz)
           
 
Method Summary
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, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyDescriptor

protected PropertyDescriptor(Class<? extends P> clazz)

PropertyDescriptor

protected PropertyDescriptor()
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)


Copyright © 2004-2013. All Rights Reserved.