提交 4f2626aa 编写于 作者: V Vojtech Juranek

Add convenient method for checking if object is MatrixProject

This is useful for jelly pages where instanceof operator doesn't work.
上级 184b4a9a
......@@ -28,6 +28,7 @@ package hudson;
import hudson.cli.CLICommand;
import hudson.console.ConsoleAnnotationDescriptor;
import hudson.console.ConsoleAnnotatorFactory;
import hudson.matrix.MatrixProject;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.Describable;
......@@ -187,6 +188,10 @@ public class Functions {
public static boolean isModelWithChildren(Object o) {
return o instanceof ModelObjectWithChildren;
}
public static boolean isMatrixProject(Object o) {
return o instanceof MatrixProject;
}
public static String xsDate(Calendar cal) {
return Util.XS_DATETIME_FORMATTER.format(cal.getTime());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册