org.mozilla.javascript.ScriptableObject.checkValidAttributes()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 JavaScript  
字(7.2k)|赞(0)|评价(0)|浏览(115)

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

ScriptableObject.checkValidAttributes介绍

暂无

代码示例

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

final synchronized void setAttributes(int value)
{
  checkValidAttributes(value);
  attributes = (short)value;
}

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

synchronized void setAttributes(int value)
{
  checkValidAttributes(value);
  attributes = (short)value;
}

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

final synchronized void setAttributes(int value)
{
  checkValidAttributes(value);
  attributes = (short)value;
}

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

synchronized void setAttributes(int value)
{
  checkValidAttributes(value);
  attributes = (short)value;
}

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

synchronized void setAttributes(int value)
{
  checkValidAttributes(value);
  attributes = (short)value;
}

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

synchronized void setAttributes(int value)
{
  checkValidAttributes(value);
  attributes = (short)value;
}

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

final void setAttributes(int id, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  ensureId(id);
  synchronized (this) {
    attributeArray[id - 1] = (short)attributes;
  }
}

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

final void setAttributes(int id, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  ensureId(id);
  synchronized (this) {
    attributeArray[id - 1] = (short)attributes;
  }
}

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

final void setAttributes(int id, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  ensureId(id);
  synchronized (this) {
    attributeArray[id - 1] = (short)attributes;
  }
}

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

final void setAttributes(int id, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  ensureId(id);
  synchronized (this) {
    attributeArray[id - 1] = (short)attributes;
  }
}

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

final void setAttributes(int id, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  ensureId(id);
  synchronized (this) {
    attributeArray[id - 1] = (short)attributes;
  }
}

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

final void setAttributes(int id, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  ensureId(id);
  synchronized (this) {
    attributeArray[id - 1] = (short)attributes;
  }
}

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

final void initValue(int id, String name, Object value, int attributes)
{
  if (!(1 <= id && id <= maxId))
    throw new IllegalArgumentException();
  if (name == null)
    throw new IllegalArgumentException();
  if (value == NOT_FOUND)
    throw new IllegalArgumentException();
  ScriptableObject.checkValidAttributes(attributes);
  if (obj.findPrototypeId(name) != id)
    throw new IllegalArgumentException(name);
  if (id == constructorId) {
    if (!(value instanceof IdFunctionObject)) {
      throw new IllegalArgumentException("consructor should be initialized with IdFunctionObject");
    }
    constructor = (IdFunctionObject)value;
    constructorAttrs = (short)attributes;
    return;
  }
  initSlot(id, name, value, attributes);
}

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

final void initValue(int id, String name, Object value, int attributes)
{
  if (!(1 <= id && id <= maxId))
    throw new IllegalArgumentException();
  if (name == null)
    throw new IllegalArgumentException();
  if (value == NOT_FOUND)
    throw new IllegalArgumentException();
  ScriptableObject.checkValidAttributes(attributes);
  if (obj.findPrototypeId(name) != id)
    throw new IllegalArgumentException(name);
  if (id == constructorId) {
    if (!(value instanceof IdFunctionObject)) {
      throw new IllegalArgumentException("consructor should be initialized with IdFunctionObject");
    }
    constructor = (IdFunctionObject)value;
    constructorAttrs = (short)attributes;
    return;
  }
  initSlot(id, name, value, attributes);
}

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

final void initValue(int id, String name, Object value, int attributes)
{
  if (!(1 <= id && id <= maxId))
    throw new IllegalArgumentException();
  if (name == null)
    throw new IllegalArgumentException();
  if (value == NOT_FOUND)
    throw new IllegalArgumentException();
  ScriptableObject.checkValidAttributes(attributes);
  if (obj.findPrototypeId(name) != id)
    throw new IllegalArgumentException(name);
  if (id == constructorId) {
    if (!(value instanceof IdFunctionObject)) {
      throw new IllegalArgumentException("consructor should be initialized with IdFunctionObject");
    }
    constructor = (IdFunctionObject)value;
    constructorAttrs = (short)attributes;
    return;
  }
  initSlot(id, name, value, attributes);
}

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

final void initValue(int id, String name, Object value, int attributes)
{
  if (!(1 <= id && id <= maxId))
    throw new IllegalArgumentException();
  if (name == null)
    throw new IllegalArgumentException();
  if (value == NOT_FOUND)
    throw new IllegalArgumentException();
  ScriptableObject.checkValidAttributes(attributes);
  if (obj.findPrototypeId(name) != id)
    throw new IllegalArgumentException(name);
  if (id == constructorId) {
    if (!(value instanceof IdFunctionObject)) {
      throw new IllegalArgumentException("consructor should be initialized with IdFunctionObject");
    }
    constructor = (IdFunctionObject)value;
    constructorAttrs = (short)attributes;
    return;
  }
  initSlot(id, name, value, attributes);
}

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

final void initValue(int id, String name, Object value, int attributes)
{
  if (!(1 <= id && id <= maxId))
    throw new IllegalArgumentException();
  if (name == null)
    throw new IllegalArgumentException();
  if (value == NOT_FOUND)
    throw new IllegalArgumentException();
  ScriptableObject.checkValidAttributes(attributes);
  if (obj.findPrototypeId(name) != id)
    throw new IllegalArgumentException(name);
  if (id == constructorId) {
    if (!(value instanceof IdFunctionObject)) {
      throw new IllegalArgumentException("consructor should be initialized with IdFunctionObject");
    }
    constructor = (IdFunctionObject)value;
    constructorAttrs = (short)attributes;
    return;
  }
  initSlot(id, name, value, attributes);
}

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

public void setAttributes(String name, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  int info = findInstanceIdInfo(name);
  if (info != 0) {
    int currentAttributes = (info >>> 16);
    if (attributes != currentAttributes) {
      throw new RuntimeException(
        "Change of attributes for this id is not supported");
    }
    return;
  }
  if (prototypeValues != null) {
    int id = prototypeValues.findId(name);
    if (id != 0) {
      prototypeValues.setAttributes(id, attributes);
      return;
    }
  }
  super.setAttributes(name, attributes);
}

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

@Override
public void setAttributes(String name, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  int info = findInstanceIdInfo(name);
  if (info != 0) {
    int currentAttributes = (info >>> 16);
    if (attributes != currentAttributes) {
      throw new RuntimeException(
        "Change of attributes for this id is not supported");
    }
    return;
  }
  if (prototypeValues != null) {
    int id = prototypeValues.findId(name);
    if (id != 0) {
      prototypeValues.setAttributes(id, attributes);
      return;
    }
  }
  super.setAttributes(name, attributes);
}

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

@Override
public void setAttributes(String name, int attributes)
{
  ScriptableObject.checkValidAttributes(attributes);
  int info = findInstanceIdInfo(name);
  if (info != 0) {
    int id = (info & 0xFFFF);
    int currentAttributes = (info >>> 16);
    if (attributes != currentAttributes) {
      setInstanceIdAttributes(id, attributes);
    }
    return;
  }
  if (prototypeValues != null) {
    int id = prototypeValues.findId(name);
    if (id != 0) {
      prototypeValues.setAttributes(id, attributes);
      return;
    }
  }
  super.setAttributes(name, attributes);
}

相关文章

微信公众号

ScriptableObject类方法