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

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

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

ScriptableObject.getDefaultValue介绍

[英]Implements the DefaultValue internal method.

Note that the toPrimitive conversion is a no-op for every type other than Object, for which DefaultValue is called. See ECMA 9.1.

A hint of null means "no hint".
[中]实现DefaultValue内部方法。
请注意,TopPrimitive转换对于除对象之外的所有类型都是不可操作的,为此调用了DefaultValue。见ECMA 9.1。
hint为空表示“无提示”。

代码示例

代码示例来源:origin: com.atlassian.pluginkit/ringojs-kit

public static Object getDefaultValue(Scriptable object, Class<?> typeHint)
{
  return ScriptableObject.getDefaultValue(object, typeHint);
}

代码示例来源:origin: org.geoserver.script/gs-script-js

@Override
public Object getDefaultValue(Class<?> hint) {
  return ScriptableObject.getDefaultValue(this, hint);
}

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

/**
 * Implements the [[DefaultValue]] internal method.
 *
 * <p>Note that the toPrimitive conversion is a no-op for
 * every type other than Object, for which [[DefaultValue]]
 * is called. See ECMA 9.1.<p>
 *
 * A <code>hint</code> of null means "no hint".
 *
 * @param typeHint the type hint
 * @return the default value for the object
 *
 * See ECMA 8.6.2.6.
 */
public Object getDefaultValue(Class<?> typeHint)
{
  return getDefaultValue(this, typeHint);
}

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

/**
 * Implements the [[DefaultValue]] internal method.
 *
 * <p>Note that the toPrimitive conversion is a no-op for
 * every type other than Object, for which [[DefaultValue]]
 * is called. See ECMA 9.1.<p>
 *
 * A <code>hint</code> of null means "no hint".
 *
 * @param typeHint the type hint
 * @return the default value for the object
 *
 * See ECMA 8.6.2.6.
 */
public Object getDefaultValue(Class<?> typeHint)
{
  return getDefaultValue(this, typeHint);
}

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

/**
 * Implements the [[DefaultValue]] internal method.
 *
 * <p>Note that the toPrimitive conversion is a no-op for
 * every type other than Object, for which [[DefaultValue]]
 * is called. See ECMA 9.1.<p>
 *
 * A <code>hint</code> of null means "no hint".
 *
 * @param typeHint the type hint
 * @return the default value for the object
 *
 * See ECMA 8.6.2.6.
 */
public Object getDefaultValue(Class<?> typeHint)
{
  return getDefaultValue(this, typeHint);
}

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

/**
 * Implements the [[DefaultValue]] internal method.
 *
 * <p>Note that the toPrimitive conversion is a no-op for
 * every type other than Object, for which [[DefaultValue]]
 * is called. See ECMA 9.1.<p>
 *
 * A <code>hint</code> of null means "no hint".
 *
 * @param typeHint the type hint
 * @return the default value for the object
 *
 * See ECMA 8.6.2.6.
 */
public Object getDefaultValue(Class<?> typeHint)
{
  return getDefaultValue(this, typeHint);
}

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

/**
 * Implements the [[DefaultValue]] internal method.
 *
 * <p>Note that the toPrimitive conversion is a no-op for
 * every type other than Object, for which [[DefaultValue]]
 * is called. See ECMA 9.1.<p>
 *
 * A <code>hint</code> of null means "no hint".
 *
 * @param typeHint the type hint
 * @return the default value for the object
 *
 * See ECMA 8.6.2.6.
 */
public Object getDefaultValue(Class<?> typeHint)
{
  return getDefaultValue(this, typeHint);
}

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

/**
 * Implements the [[DefaultValue]] internal method.
 *
 * <p>Note that the toPrimitive conversion is a no-op for
 * every type other than Object, for which [[DefaultValue]]
 * is called. See ECMA 9.1.<p>
 *
 * A <code>hint</code> of null means "no hint".
 *
 * @param typeHint the type hint
 * @return the default value for the object
 *
 * See ECMA 8.6.2.6.
 */
public Object getDefaultValue(Class typeHint)
{
  return getDefaultValue(this, typeHint);
}

代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl

public Object getDefaultValue(Class hint) {
  if (scope == null) {
    return super.getDefaultValue(hint);
  }
  return scope.getDefaultValue(this, hint);
}

相关文章

微信公众号

ScriptableObject类方法