本文整理了Java中org.mozilla.javascript.Context.getContext()
方法的一些代码示例,展示了Context.getContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getContext()
方法的具体详情如下:
包路径:org.mozilla.javascript.Context
类名称:Context
方法名:getContext
[英]Internal method that reports an error for missing calls to enter().
[中]内部方法,该方法报告缺少对enter()的调用的错误。
代码示例来源:origin: rhino/js
public static Scriptable toObject(Scriptable scope, Object val)
{
if (val instanceof Scriptable) {
return (Scriptable)val;
}
return toObject(Context.getContext(), scope, val);
}
代码示例来源:origin: rhino/js
/**
* @deprecated Use {@link #toObject(Scriptable, Object)} instead.
*/
public static Scriptable toObject(Scriptable scope, Object val,
Class<?> staticClass)
{
if (val instanceof Scriptable) {
return (Scriptable)val;
}
return toObject(Context.getContext(), scope, val);
}
代码示例来源:origin: geogebra/geogebra
public static Scriptable toObject(Scriptable scope, Object val)
{
if (val instanceof Scriptable) {
return (Scriptable)val;
}
return toObject(Context.getContext(), scope, val);
}
代码示例来源:origin: com.github.tntim96/rhino
public static Scriptable toObject(Scriptable scope, Object val)
{
if (val instanceof Scriptable) {
return (Scriptable)val;
}
return toObject(Context.getContext(), scope, val);
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* @deprecated Use {@link #toObject(Scriptable, Object)} instead.
*/
public static Scriptable toObject(Scriptable scope, Object val,
Class<?> staticClass)
{
if (val instanceof Scriptable) {
return (Scriptable)val;
}
return toObject(Context.getContext(), scope, val);
}
代码示例来源:origin: geogebra/geogebra
/**
* @deprecated Use {@link #toObject(Scriptable, Object)} instead.
*/
@Deprecated
public static Scriptable toObject(Scriptable scope, Object val,
Class<?> staticClass)
{
if (val instanceof Scriptable) {
return (Scriptable)val;
}
return toObject(Context.getContext(), scope, val);
}
代码示例来源:origin: rhino/js
@Override
public Object getDefaultValue(Class<?> hint)
{
if (hint == ScriptRuntime.NumberClass) {
Context cx = Context.getContext();
if (cx.getLanguageVersion() == Context.VERSION_1_2)
return new Long(length);
}
return super.getDefaultValue(hint);
}
代码示例来源:origin: rhino/js
@Override
public Object get(int index, Scriptable start) {
if (0 <= index && index < length) {
Context cx = Context.getContext();
Object obj = Array.get(array, index);
return cx.getWrapFactory().wrap(cx, this, obj, cls);
}
return Undefined.instance;
}
代码示例来源:origin: geogebra/geogebra
@Override
public Object get(int index, Scriptable start) {
if (0 <= index && index < length) {
Context cx = Context.getContext();
Object obj = Array.get(array, index);
return cx.getWrapFactory().wrap(cx, this, obj, cls);
}
return Undefined.instance;
}
代码示例来源:origin: geogebra/geogebra
/**
* @deprecated Use {@link Context#getWrapFactory()} together with calling {@link
* WrapFactory#wrap(Context, Scriptable, Object, Class)}
*/
@Deprecated
public static Object wrap(Scriptable scope, Object obj, Class<?> staticType) {
Context cx = Context.getContext();
return cx.getWrapFactory().wrap(cx, scope, obj, staticType);
}
代码示例来源:origin: geogebra/geogebra
@Override
public Object getDefaultValue(Class<?> hint)
{
if (hint == ScriptRuntime.NumberClass) {
Context cx = Context.getContext();
if (cx.getLanguageVersion() == Context.VERSION_1_2)
return Long.valueOf(length);
}
return super.getDefaultValue(hint);
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
public Object getDefaultValue(Class hint)
{
if (hint == ScriptRuntime.NumberClass) {
Context cx = Context.getContext();
if (cx.getLanguageVersion() == Context.VERSION_1_2)
return new Long(length);
}
return super.getDefaultValue(hint);
}
代码示例来源:origin: rhino/js
/**
@deprecated Use {@link Context#getWrapFactory()} together with calling {@link
WrapFactory#wrap(Context, Scriptable, Object, Class)}
*/
public static Object wrap(Scriptable scope, Object obj, Class<?> staticType) {
Context cx = Context.getContext();
return cx.getWrapFactory().wrap(cx, scope, obj, staticType);
}
代码示例来源:origin: io.apigee/rhino
/**
@deprecated Use {@link Context#getWrapFactory()} together with calling {@link
WrapFactory#wrap(Context, Scriptable, Object, Class)}
*/
public static Object wrap(Scriptable scope, Object obj, Class<?> staticType) {
Context cx = Context.getContext();
return cx.getWrapFactory().wrap(cx, scope, obj, staticType);
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
@deprecated Use {@link Context#getWrapFactory()} together with calling {@link
WrapFactory#wrap(Context, Scriptable, Object, Class)}
*/
public static Object wrap(Scriptable scope, Object obj, Class<?> staticType) {
Context cx = Context.getContext();
return cx.getWrapFactory().wrap(cx, scope, obj, staticType);
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
/**
@deprecated Use {@link Context#getWrapFactory()} together with calling {@link
WrapFactory#wrap(Context cx, Scriptable scope, Object obj, Class)}
*/
public static Object wrap(Scriptable scope, Object obj, Class staticType) {
Context cx = Context.getContext();
return cx.getWrapFactory().wrap(cx, scope, obj, staticType);
}
代码示例来源:origin: rhino/js
/**
* The typeof operator that correctly handles the undefined case
*/
public static String typeofName(Scriptable scope, String id)
{
Context cx = Context.getContext();
Scriptable val = bind(cx, scope, id);
if (val == null)
return "undefined";
return typeof(getObjectProp(val, id, cx));
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* The typeof operator that correctly handles the undefined case
*/
public static String typeofName(Scriptable scope, String id)
{
Context cx = Context.getContext();
Scriptable val = bind(cx, scope, id);
if (val == null)
return "undefined";
return typeof(getObjectProp(val, id, cx));
}
代码示例来源:origin: geogebra/geogebra
/**
* The typeof operator that correctly handles the undefined case
*/
public static String typeofName(Scriptable scope, String id)
{
Context cx = Context.getContext();
Scriptable val = bind(cx, scope, id);
if (val == null)
return "undefined";
return typeof(getObjectProp(val, id, cx));
}
代码示例来源:origin: io.apigee/rhino
/**
* The typeof operator that correctly handles the undefined case
*/
public static String typeofName(Scriptable scope, String id)
{
Context cx = Context.getContext();
Scriptable val = bind(cx, scope, id);
if (val == null)
return "undefined";
return typeof(getObjectProp(val, id, cx));
}
内容来源于网络,如有侵权,请联系作者删除!