예제 #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;
 }