本文整理了Java中azkaban.utils.Utils.nonNull()
方法的一些代码示例,展示了Utils.nonNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.nonNull()
方法的具体详情如下:
包路径:azkaban.utils.Utils
类名称:Utils
方法名:nonNull
[英]Return the object if it is non-null, otherwise throw an exception
[中]如果对象非空,则返回该对象,否则引发异常
代码示例来源:origin: azkaban/azkaban
/**
* Creates a page and sets up the velocity engine to render
*/
public Page(final HttpServletRequest request, final HttpServletResponse response,
final VelocityEngine engine, final String template) {
this.request = Utils.nonNull(request);
this.response = Utils.nonNull(response);
this.engine = Utils.nonNull(engine);
this.template = Utils.nonNull(template);
this.context = new VelocityContext();
this.context.put("esc", new EscapeTool());
this.context.put("session", request.getSession(true));
this.context.put("context", request.getContextPath());
}
代码示例来源:origin: com.linkedin.azkaban/azkaban
/**
* Creates a page and sets up the velocity engine to render
*
* @param request
* @param response
* @param engine
* @param template
*/
public Page(HttpServletRequest request, HttpServletResponse response,
VelocityEngine engine, String template) {
this.request = Utils.nonNull(request);
this.response = Utils.nonNull(response);
this.engine = Utils.nonNull(engine);
this.template = Utils.nonNull(template);
this.context = new VelocityContext();
this.context.put("session", request.getSession(true));
this.context.put("context", request.getContextPath());
}
内容来源于网络,如有侵权,请联系作者删除!