本文整理了Java中jdk.nashorn.api.scripting.JSObject.isFunction()
方法的一些代码示例,展示了JSObject.isFunction()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSObject.isFunction()
方法的具体详情如下:
包路径:jdk.nashorn.api.scripting.JSObject
类名称:JSObject
方法名:isFunction
暂无
代码示例来源:origin: spullara/mustache.java
@Override
public Object coerce(Object object) {
if (object instanceof JSObject) {
final JSObject jso = (JSObject) object;
if (jso.isFunction()) {
return new TemplateFunction() {
@Override
public String apply(String s) {
Object call = jso.call(jso, s);
return call == null ? null : call.toString();
}
};
} else if (jso.isArray()) {
// Let's see what it is really. Maybe it is a list.
return new ArrayList(((Map) jso).values());
}
}
return super.coerce(object);
}
}
代码示例来源:origin: spullara/mustache.java
@Override
public String stringify(Object object) {
if (object instanceof JSObject) {
final JSObject jso = (JSObject) object;
if (jso.isFunction()) {
Object call = jso.call(jso);
return stringify(coerce(call));
}
}
return super.stringify(object);
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server-shaded
boolean hasFunction(String funcName) {
final Object member = plugin.get(funcName);
if (!(member instanceof JSObject)) {
return false;
}
return ((JSObject) member).isFunction();
}
代码示例来源:origin: line/centraldogma
boolean hasFunction(String funcName) {
final Object member = plugin.get(funcName);
if (!(member instanceof JSObject)) {
return false;
}
return ((JSObject) member).isFunction();
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server
boolean hasFunction(String funcName) {
final Object member = plugin.get(funcName);
if (!(member instanceof JSObject)) {
return false;
}
return ((JSObject) member).isFunction();
}
代码示例来源:origin: com.eas.platypus/platypus-js-common-utils
public JSObject createModule(String aModuleName) {
assert lookupInGlobalFunc != null : SCRIPT_NOT_INITIALIZED;
JSObject jsConstructor = lookup(aModuleName);
if (jsConstructor != null && jsConstructor.isFunction()) {
return (JSObject) jsConstructor.newObject(new Object[]{});
} else {
return null;
}
}
代码示例来源:origin: com.eas.platypus/platypus-js-datamodel
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-core
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-core
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-datamodel
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public JSObject getPublished() {
if (published == null) {
JSObject publisher = Scripts.getSpace().getPublisher(this.getClass().getName());
if (publisher == null || !publisher.isFunction()) {
throw new NoPublisherException();
}
published = (JSObject) publisher.call(null, new Object[]{this});
}
return published;
}
内容来源于网络,如有侵权,请联系作者删除!