本文整理汇总了Java中com.ibm.jscript.types.FBSNull类的典型用法代码示例。如果您正苦于以下问题:Java FBSNull类的具体用法?Java FBSNull怎么用?Java FBSNull使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FBSNull类属于com.ibm.jscript.types包,在下文中一共展示了FBSNull类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invoke
import com.ibm.jscript.types.FBSNull; //导入依赖的package包/类
public FBSValue invoke(HttpServletRequest request, int id, Object params) throws Exception {
String scriptStr = getScript();
if(StringUtil.isNotEmpty(scriptStr)) {
JavaScriptInterpreter interpreter = JavaScriptUtil.getInterpreter(FacesContext.getCurrentInstance());
FBSObject paramObject = getParamObject(interpreter, getArguments(), (ArrayObject)params);
// As part of SPR#MKEE9M5JQ2, changing this from passing in
// the script String to passing the Expression, to avoid the try{}catch(Exception) block
// in the method taking the String argument.
JSExpression scriptExpr = JavaScriptUtil.getJSContext().getExpression(scriptStr);
FBSValue value = (FBSValue)interpreter.interpret(getComponent(), scriptExpr, paramObject );
return value;
}
return FBSNull.nullValue;
}
示例2: wrap
import com.ibm.jscript.types.FBSNull; //导入依赖的package包/类
public static final JSJson wrap(Object o) throws JsonException {
if(o instanceof FBSNull) {
return new JSJson();
}
if(o instanceof FBSUndefined) {
return new JSJson();
}
if(o instanceof FBSObject) {
return new JSJson((FBSObject)o);
}
throw new JsonException(null,"The value {0} is neither a JavaScript object or array"); // $NLX-JSJson.Thevalue0isneitheraJavaScriptobje-1$
}
示例3: putObject
import com.ibm.jscript.types.FBSNull; //导入依赖的package包/类
public void putObject(String propertyName, JSJson object) throws JsonException {
if(value!=null) {
putProperty(propertyName, value);
} else {
putProperty(propertyName, FBSNull.nullValue);
}
}
示例4: getValue
import com.ibm.jscript.types.FBSNull; //导入依赖的package包/类
@Override
public Object getValue() {
return FBSNull.nullValue;
}