示例#1
0
文件: Job.java 项目: neo2buha/jenkins
 /**
  * Removes the property of the given type.
  *
  * @return The property that was just removed.
  * @since 1.279
  */
 public <T extends JobProperty> T removeProperty(Class<T> clazz) throws IOException {
   for (JobProperty<? super JobT> p : properties) {
     if (clazz.isInstance(p)) {
       removeProperty(p);
       return clazz.cast(p);
     }
   }
   return null;
 }
示例#2
0
文件: Job.java 项目: neo2buha/jenkins
 /** Gets the specific property, or null if the propert is not configured for this job. */
 public <T extends JobProperty> T getProperty(Class<T> clazz) {
   for (JobProperty p : properties) {
     if (clazz.isInstance(p)) return clazz.cast(p);
   }
   return null;
 }