1 package hudson.model; 2 3 import java.util.List ; 4 import java.util.ArrayList ; 5 6 13 public abstract class JobPropertyDescriptor extends Descriptor<JobProperty<?>> { 14 protected JobPropertyDescriptor(Class <? extends JobProperty<?>> clazz) { 15 super(clazz); 16 } 17 18 31 public abstract boolean isApplicable(Class <? extends Job> jobType); 32 33 36 public static List <JobPropertyDescriptor> getPropertyDescriptors(Class <? extends Job> clazz) { 37 List <JobPropertyDescriptor> r = new ArrayList <JobPropertyDescriptor>(); 38 for (JobPropertyDescriptor p : Jobs.PROPERTIES) 39 if(p.isApplicable(clazz)) 40 r.add(p); 41 return r; 42 } 43 } 44 | Popular Tags |