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

x33g5p2x  于2022-01-24 转载在 JavaScript  
字(3.9k)|赞(0)|评价(0)|浏览(174)

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

NativeArray.put介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

NativeArray array;
array.put(array.size(), array, result);

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

@Override
protected void defineOwnProperty(Context cx, Object id,
                 ScriptableObject desc,
                 boolean checkValid) {
 if (dense != null) {
  Object[] values = dense;
  dense = null;
  denseOnly = false;
  for (int i = 0; i < values.length; i++) {
   if (values[i] != NOT_FOUND) {
    put(i, this, values[i]);
   }
  }
 }
 long index = toArrayIndex(id);
 if (index >= length) {
  length = index + 1;
 }
 super.defineOwnProperty(cx, id, desc, checkValid);
}

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

@Override
protected void defineOwnProperty(Context cx, Object id,
                 ScriptableObject desc,
                 boolean checkValid) {
 if (dense != null) {
  Object[] values = dense;
  dense = null;
  denseOnly = false;
  for (int i = 0; i < values.length; i++) {
   if (values[i] != NOT_FOUND) {
    put(i, this, values[i]);
   }
  }
 }
 long index = toArrayIndex(id);
 if (index >= length) {
  length = index + 1;
 }
 super.defineOwnProperty(cx, id, desc, checkValid);
}

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

@Override
protected void defineOwnProperty(Context cx, Object id,
                 ScriptableObject desc,
                 boolean checkValid) {
 if (dense != null) {
  Object[] values = dense;
  dense = null;
  denseOnly = false;
  for (int i = 0; i < values.length; i++) {
   if (values[i] != NOT_FOUND) {
    put(i, this, values[i]);
   }
  }
 }
 long index = toArrayIndex(id);
 if (index >= length) {
  length = index + 1;
 }
 super.defineOwnProperty(cx, id, desc, checkValid);
}

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

@Override
protected void defineOwnProperty(Context cx, Object id,
                 ScriptableObject desc,
                 boolean checkValid) {
 if (dense != null) {
  Object[] values = dense;
  dense = null;
  denseOnly = false;
  for (int i = 0; i < values.length; i++) {
   if (values[i] != NOT_FOUND) {
    put(i, this, values[i]);
   }
  }
 }
 long index = toArrayIndex(id);
 if (index >= length) {
  length = index + 1;
 }
 super.defineOwnProperty(cx, id, desc, checkValid);
}

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

objUrlPattern.put("httpMethod", objUrlPattern, rs.getString("HTTP_METHOD"));
count++;
arrUrlPatterns.put(count, arrUrlPatterns, objUrlPattern);

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

public NativeArray jsFunction_getChildren() throws Exception {
  List list = wk.getChildren();
  NativeArray arr =
    (NativeArray)org.mozilla.javascript.Context.getCurrentContext().newObject(getParentScope(),
                                         "Array",
                                         new Object[]{new Integer(list.size())});
  Iterator iter = list.iterator();
  for (int i = 0; iter.hasNext(); i++) {
    WebContinuation child = (WebContinuation)iter.next();
    FOM_WebContinuation cwk = new FOM_WebContinuation(child);
    cwk.setParentScope(getParentScope());
    cwk.setPrototype(getClassPrototype(getParentScope(),
                      cwk.getClassName()));
    arr.put(i, arr, cwk);
  }
  return arr;
}

代码示例来源:origin: org.wso2.carbon.appmgt/org.wso2.carbon.appmgt.impl

public static NativeArray getAvailableProviders() {
    AppManagerConfiguration config = ServiceReferenceHolder.getInstance().
        getAPIManagerConfigurationService().getAPIManagerConfiguration();

    List<SSOEnvironment> ssoEnvironments = config.getSsoEnvironments();
    NativeArray availableProviders = new NativeArray(0);
    int i = 0;
//        boolean isAvailable = false;
    for(SSOEnvironment env: ssoEnvironments) {
      try {
        SSOConfigurator configurator = (SSOConfigurator) Class.forName(env.getProviderClass()).newInstance();
        configurator.init(env.getParameters());
//                if(configurator.isAvailable()) {
//                    isAvailable = true;
//                }
      } catch (Exception e) {
        log.warn("Unable to check availability of SSO Provider " + env.toString() + " - SSO configurator will be disabled.");
      }

//            if(isAvailable) {
        availableProviders.put(i++, availableProviders, env.getName() + "-" + env.getVersion());
//            }
    }
    return availableProviders;
  }

代码示例来源:origin: datacleaner/DataCleaner

values.put(i, values, value);
values.put(column.getName(), values, value);

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

h.put((int)h.getLength(), h, source);

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

h.put((int)h.getLength(), h, source);

相关文章

微信公众号