Package org.mozilla.javascript

Examples of org.mozilla.javascript.Wrapper.unwrap()


        }

        // TODO: E4X Bug? Shouldn't need this copy, but without it the outer element gets lost. See Mozilla bugzilla 361722
        Scriptable jsXML = (Scriptable) ScriptableObject.callMethod((Scriptable) o, "copy", new Object[0]);
        Wrapper wrapper = (Wrapper) ScriptableObject.callMethod((XMLObject)jsXML, "getXmlObject", new Object[0]);
        XmlObject xmlObject = (XmlObject)wrapper.unwrap();
        try {

            StAXOMBuilder builder = new StAXOMBuilder(xmlObject.newInputStream());
            OMElement omElement = builder.getDocumentElement();
View Full Code Here


                Scriptable s = (Scriptable)jsResp;
                Object out = ScriptableObject.callMethod(s,
                                                         "getXmlObject",
                                                         Context.emptyArgs);
                Wrapper wrapped = (Wrapper)out;
                XmlObject xml = (XmlObject)wrapped.unwrap();
                node = xml.getDomNode();
                response.setNode(node.getOwnerDocument());
            } else {
                if (jsResp instanceof Wrapper) {
                    jsResp = ((Wrapper)jsResp).unwrap();
View Full Code Here

    final Object value = ob.get(key, ob);
    if(value instanceof String) {
      return (String) value;
    } else if(value instanceof Wrapper) {
      Wrapper w = (Wrapper) value;
      if(w.unwrap() instanceof String) {
        return (String) w.unwrap();
      }
      return null;
    } else {
      return null;
View Full Code Here

    if(value instanceof String) {
      return (String) value;
    } else if(value instanceof Wrapper) {
      Wrapper w = (Wrapper) value;
      if(w.unwrap() instanceof String) {
        return (String) w.unwrap();
      }
      return null;
    } else {
      return null;
    }
View Full Code Here

    final Object value = ob.get(key, ob);
    if(value instanceof String) {
      return (String) value;
    } else if(value instanceof Wrapper) {
      Wrapper w = (Wrapper) value;
      if(w.unwrap() instanceof String) {
        return (String) w.unwrap();
      }
      return null;
    } else {
      return null;
View Full Code Here

    if(value instanceof String) {
      return (String) value;
    } else if(value instanceof Wrapper) {
      Wrapper w = (Wrapper) value;
      if(w.unwrap() instanceof String) {
        return (String) w.unwrap();
      }
      return null;
    } else {
      return null;
    }
View Full Code Here

      if (njb instanceof NativeJavaClass) {
        return njb;
      }

      Object obj = njb.unwrap();
      if (obj instanceof Number || obj instanceof String
          || obj instanceof Boolean || obj instanceof Character) {
        // special type wrapped -- we just leave it as is.
        return njb;
      } else {
View Full Code Here

      if (njb instanceof NativeJavaClass) {
        return njb;
      }

      Object obj = njb.unwrap();
      if (obj instanceof Number || obj instanceof String
          || obj instanceof Boolean || obj instanceof Character) {
        // special type wrapped -- we just leave it as is.
        return njb;
      } else {
View Full Code Here

                Scriptable s = (Scriptable)jsResp;
                Object out = ScriptableObject.callMethod(s,
                                                         "getXmlObject",
                                                         Context.emptyArgs);
                Wrapper wrapped = (Wrapper)out;
                XmlObject xml = (XmlObject)wrapped.unwrap();
                node = xml.getDomNode();
                response.setNode(node.getOwnerDocument());
            } else {
                if (jsResp instanceof Wrapper) {
                    jsResp = ((Wrapper)jsResp).unwrap();
View Full Code Here

        Scriptable jsXML =
            (Scriptable) ScriptableObject.callMethod((Scriptable) scriptXML, "copy", new Object[0]);
        Wrapper wrapper =
            (Wrapper) ScriptableObject.callMethod((XMLObject)jsXML, "getXmlObject", new Object[0]);

        XmlObject xmlObject = (XmlObject) wrapper.unwrap();

        try {
            StAXOMBuilder builder = new StAXOMBuilder(xmlObject.newInputStream());
            return builder.getDocumentElement();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.