提交 672ffe80 编写于 作者: K kohsuke

another overloaded removeProperty

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14767 71c3de6d-444a-0410-be80-ed276b4c234a
上级 e9d491a8
......@@ -314,6 +314,23 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
save();
}
/**
* 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;
}
/**
* Gets all the job properties configured for this job.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册