gpt4 book ai didi

org.mozilla.javascript.xml.XMLObject类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 14:45:40 28 4
gpt4 key购买 nike

本文整理了Java中org.mozilla.javascript.xml.XMLObject类的一些代码示例,展示了XMLObject类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLObject类的具体详情如下:
包路径:org.mozilla.javascript.xml.XMLObject
类名称:XMLObject

XMLObject介绍

[英]This Interface describes what all XML objects (XML, XMLList) should have in common.
[中]这个接口描述了所有XML对象(XML、XMLList)的共同点。

代码示例

代码示例来源:origin: rhino/js

public static Scriptable enterDotQuery(Object value, Scriptable scope)
{
  if (!(value instanceof XMLObject)) {
    throw notXmlError(value);
  }
  XMLObject object = (XMLObject)value;
  return object.enterDotQuery(scope);
}

代码示例来源:origin: rhino/js

public static Ref memberRef(Object obj, Object elem,
              Context cx, int memberTypeFlags)
{
  if (!(obj instanceof XMLObject)) {
    throw notXmlError(obj);
  }
  XMLObject xmlObject = (XMLObject)obj;
  return xmlObject.memberRef(cx, elem, memberTypeFlags);
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

public final Object get(String name, Scriptable start) {
  return super.get(name, start);
}

代码示例来源:origin: com.github.tntim96/rhino

@Override
public Object getFunctionProperty(Context cx, int id) {
  if (prototypeFlag) {
    return super.get(id, this);
  } else {
    Scriptable proto = getPrototype();
    if (proto instanceof XMLObject) {
      return ((XMLObject)proto).getFunctionProperty(cx, id);
    }
  }
  return NOT_FOUND;
}

代码示例来源:origin: io.apigee/rhino

if (withObj instanceof XMLObject) {
  XMLObject xmlObj = (XMLObject)withObj;
  if (xmlObj.has(name, xmlObj)) {
    result = xmlObj.get(name, xmlObj);
    break;
  result = firstXMLObject.get(name, firstXMLObject);

代码示例来源:origin: com.sun.phobos/phobos-rhino

public final Object addValues(Context cx, boolean thisIsLeft,
  Object value) {
  if (value instanceof XMLObject) {
    XMLObject v1, v2;
    if (thisIsLeft) {
      v1 = this;
      v2 = (XMLObject)value;
    } else {
      v1 = (XMLObject)value;
      v2 = this;
    }
    return lib.addXMLObjects(cx, v1, v2);
  }
  if (value == Undefined.instance) {
    // both "xml + undefined" and "undefined + xml" gives String(xml)
    return ScriptRuntime.toString(this);
  }
  
  return super.addValues(cx, thisIsLeft, value);
}

代码示例来源:origin: rhino/js

public static Scriptable enterWith(Object obj, Context cx,
                  Scriptable scope)
{
  Scriptable sobj = toObjectOrNull(cx, obj);
  if (sobj == null) {
    throw typeError1("msg.undef.with", toString(obj));
  }
  if (sobj instanceof XMLObject) {
    XMLObject xmlObject = (XMLObject)sobj;
    return xmlObject.enterWith(scope);
  }
  return new NativeWith(scope, sobj);
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

public final boolean has(String name, Scriptable start) {
  return super.has(name, start);
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

public final void put(String name, Scriptable start, Object value) {
  super.put(name, start, value);
}

代码示例来源:origin: ro.isdc.wro4j/rhino

/**
   * Gets the value returned by calling the typeof operator on this object.
   * @see org.mozilla.javascript.ScriptableObject#getTypeOf()
   * @return "xml" or "undefined" if {@link #avoidObjectDetection()} returns <code>true</code>
   */
  @Override
  public String getTypeOf()
  {
    return avoidObjectDetection() ? "undefined" : "xml";
  }
}

代码示例来源:origin: rhino/js

Scriptable extra = xmlObject.getExtraMethodSource(cx);
if (extra == null) {
  break;

代码示例来源:origin: com.github.tntim96/rhino

func = xmlObject.getFunctionProperty(cx, methodName);
if (func != Scriptable.NOT_FOUND) {
  break;
sobj = xmlObject.getExtraMethodSource(cx);
if (sobj != null) {
  thisObj = sobj;

代码示例来源:origin: geogebra/geogebra

if (withObj instanceof XMLObject) {
  XMLObject xmlObj = (XMLObject)withObj;
  if (xmlObj.has(name, xmlObj)) {
    result = xmlObj.get(name, xmlObj);
    break;
  result = firstXMLObject.get(name, firstXMLObject);

代码示例来源:origin: com.github.tntim96/rhino

@Override
public final Object addValues(Context cx, boolean thisIsLeft,
  Object value) {
  if (value instanceof XMLObject) {
    XMLObject v1, v2;
    if (thisIsLeft) {
      v1 = this;
      v2 = (XMLObject)value;
    } else {
      v1 = (XMLObject)value;
      v2 = this;
    }
    return lib.addXMLObjects(cx, v1, v2);
  }
  if (value == Undefined.instance) {
    // both "xml + undefined" and "undefined + xml" gives String(xml)
    return ScriptRuntime.toString(this);
  }
  return super.addValues(cx, thisIsLeft, value);
}

代码示例来源:origin: geogebra/geogebra

public static Scriptable enterWith(Object obj, Context cx,
                  Scriptable scope)
{
  Scriptable sobj = toObjectOrNull(cx, obj, scope);
  if (sobj == null) {
    throw typeError1("msg.undef.with", toString(obj));
  }
  if (sobj instanceof XMLObject) {
    XMLObject xmlObject = (XMLObject)sobj;
    return xmlObject.enterWith(scope);
  }
  return new NativeWith(scope, sobj);
}

代码示例来源:origin: com.github.tntim96/rhino

@Override
public Object getFunctionProperty(Context cx, String name) {
  if (prototypeFlag) {
    return super.get(name, this);
  } else {
    Scriptable proto = getPrototype();
    if (proto instanceof XMLObject) {
      return ((XMLObject)proto).getFunctionProperty(cx, name);
    }
  }
  return NOT_FOUND;
}

代码示例来源:origin: com.github.tntim96/rhino

if (withObj instanceof XMLObject) {
  XMLObject xmlObject = (XMLObject)withObj;
  if (xmlObject.has(cx, id)) {
    return xmlObject;

代码示例来源:origin: geogebra/geogebra

public static Object setObjectElem(Scriptable obj, Object elem,
                  Object value, Context cx)
{
  if (obj instanceof XMLObject) {
    ((XMLObject)obj).put(cx, elem, value);
  } else {
    String s = toStringIdOrIndex(cx, elem);
    if (s == null) {
      int index = lastIndexResult(cx);
      ScriptableObject.putProperty(obj, index, value);
    } else {
      ScriptableObject.putProperty(obj, s, value);
    }
  }
  return value;
}

代码示例来源:origin: geogebra/geogebra

/**
   * Gets the value returned by calling the typeof operator on this object.
   * @see org.mozilla.javascript.ScriptableObject#getTypeOf()
   * @return "xml" or "undefined" if {@link #avoidObjectDetection()} returns <code>true</code>
   */
  @Override
  public String getTypeOf()
  {
    return avoidObjectDetection() ? "undefined" : "xml";
  }
}

代码示例来源:origin: rhino/js

Scriptable extra = xmlObject.getExtraMethodSource(cx);
if (extra == null) {
  break;

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com