Java 类org.mozilla.javascript.xml.XMLLib 实例源码

项目:whackpad    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:whackpad    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:TaleCraft    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:TaleCraft    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:code404    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:code404    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:rhino-jscover    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:rhino-jscover    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:LoboEvolution    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:LoboEvolution    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:astor    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:astor    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:Rhino-Prov-Mod    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:Rhino-Prov-Mod    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:android-js    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:android-js    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:closure-compiler-old    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:closure-compiler-old    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:closure-compiler-copy    文件:ScriptRuntime.java   
public static Object setDefaultNamespace(Object namespace, Context cx)
{
    Scriptable scope = cx.currentActivationCall;
    if (scope == null) {
        scope = getTopCallScope(cx);
    }

    XMLLib xmlLib = currentXMLLib(cx);
    Object ns = xmlLib.toDefaultXmlNamespace(cx, namespace);

    // XXX : this should be in separated namesapce from Scriptable.get/put
    if (!scope.has(DEFAULT_NS_TAG, scope)) {
        // XXX: this is racy of cause
        ScriptableObject.defineProperty(scope, DEFAULT_NS_TAG, ns,
                                        ScriptableObject.PERMANENT
                                        | ScriptableObject.DONTENUM);
    } else {
        scope.put(DEFAULT_NS_TAG, scope, ns);
    }

    return Undefined.instance;
}
项目:closure-compiler-copy    文件:ScriptRuntime.java   
private static XMLLib currentXMLLib(Context cx)
{
    // Scripts should be running to access this
    if (cx.topCallScope == null)
        throw new IllegalStateException();

    XMLLib xmlLib = cx.cachedXMLLib;
    if (xmlLib == null) {
        xmlLib = XMLLib.extractFromScope(cx.topCallScope);
        if (xmlLib == null)
            throw new IllegalStateException();
        cx.cachedXMLLib = xmlLib;
    }

    return xmlLib;
}
项目:whackpad    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:whackpad    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:TaleCraft    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:TaleCraft    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:code404    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:code404    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:rhino-jscover    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:rhino-jscover    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:LoboEvolution    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:LoboEvolution    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:astor    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:astor    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:Rhino-Prov-Mod    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:Rhino-Prov-Mod    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:android-js    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:android-js    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:closure-compiler-old    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:closure-compiler-old    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}
项目:closure-compiler-copy    文件:ScriptRuntime.java   
public static Ref nameRef(Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, name, scope, memberTypeFlags);
}
项目:closure-compiler-copy    文件:ScriptRuntime.java   
public static Ref nameRef(Object namespace, Object name, Context cx,
                          Scriptable scope, int memberTypeFlags)
{
    XMLLib xmlLib = currentXMLLib(cx);
    return xmlLib.nameRef(cx, namespace, name, scope, memberTypeFlags);
}