当前位置: 首页>>代码示例>>Java>>正文


Java JO类代码示例

本文整理汇总了Java中jdk.nashorn.internal.scripts.JO的典型用法代码示例。如果您正苦于以下问题:Java JO类的具体用法?Java JO怎么用?Java JO使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JO类属于jdk.nashorn.internal.scripts包,在下文中一共展示了JO类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createObject

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
private Object createObject(final PropertyMap propertyMap, final List<Object> values, final ArrayData arrayData) {
    final long[] primitiveSpill = dualFields ? new long[values.size()] : null;
    final Object[] objectSpill = new Object[values.size()];

    for (final Property property : propertyMap.getProperties()) {
        if (!dualFields || property.getType() == Object.class) {
            objectSpill[property.getSlot()] = values.get(property.getSlot());
        } else {
            primitiveSpill[property.getSlot()] = ObjectClassGenerator.pack((Number) values.get(property.getSlot()));
        }
    }

    final ScriptObject object = dualFields ?
            new JD(propertyMap, primitiveSpill, objectSpill) : new JO(propertyMap, null, objectSpill);
    object.setInitialProto(global.getObjectPrototype());
    object.setArray(arrayData);
    return object;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:JSONParser.java

示例2: copyInitialMaps

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
private void copyInitialMaps(final ScriptEnvironment env) {
    this.accessorPropertyDescriptorMap = AccessorPropertyDescriptor.getInitialMap().duplicate();
    this.dataPropertyDescriptorMap = DataPropertyDescriptor.getInitialMap().duplicate();
    this.genericPropertyDescriptorMap = GenericPropertyDescriptor.getInitialMap().duplicate();
    this.nativeArgumentsMap = NativeArguments.getInitialMap().duplicate();
    this.nativeArrayMap = NativeArray.getInitialMap().duplicate();
    this.nativeBooleanMap = NativeBoolean.getInitialMap().duplicate();
    this.nativeDateMap = NativeDate.getInitialMap().duplicate();
    this.nativeErrorMap = NativeError.getInitialMap().duplicate();
    this.nativeEvalErrorMap = NativeEvalError.getInitialMap().duplicate();
    this.nativeJSAdapterMap = NativeJSAdapter.getInitialMap().duplicate();
    this.nativeNumberMap = NativeNumber.getInitialMap().duplicate();
    this.nativeRangeErrorMap = NativeRangeError.getInitialMap().duplicate();
    this.nativeReferenceErrorMap = NativeReferenceError.getInitialMap().duplicate();
    this.nativeRegExpMap = NativeRegExp.getInitialMap().duplicate();
    this.nativeRegExpExecResultMap = NativeRegExpExecResult.getInitialMap().duplicate();
    this.nativeStrictArgumentsMap = NativeStrictArguments.getInitialMap().duplicate();
    this.nativeStringMap = NativeString.getInitialMap().duplicate();
    this.nativeSyntaxErrorMap = NativeSyntaxError.getInitialMap().duplicate();
    this.nativeTypeErrorMap = NativeTypeError.getInitialMap().duplicate();
    this.nativeURIErrorMap = NativeURIError.getInitialMap().duplicate();
    this.prototypeObjectMap = PrototypeObject.getInitialMap().duplicate();
    this.objectMap = JO.getInitialMap().duplicate();
    this.functionMap = ScriptFunctionImpl.getInitialMap().duplicate();
    this.anonymousFunctionMap = ScriptFunctionImpl.getInitialAnonymousMap().duplicate();
    this.strictFunctionMap = ScriptFunctionImpl.getInitialStrictMap().duplicate();
    this.boundFunctionMap = ScriptFunctionImpl.getInitialBoundMap().duplicate();

    // java
    if (! env._no_java) {
        this.nativeJavaImporterMap = NativeJavaImporter.getInitialMap().duplicate();
    }

    // typed arrays
    if (! env._no_typed_arrays) {
        this.arrayBufferViewMap = ArrayBufferView.getInitialMap().duplicate();
        this.nativeArrayBufferMap = NativeArrayBuffer.getInitialMap().duplicate();
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:40,代码来源:Global.java

示例3: wrapAdaptee

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
private static ScriptObject wrapAdaptee(final ScriptObject adaptee) {
    return new JO(adaptee, JO.getInitialMap());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:NativeJSAdapter.java

示例4: wrapAdaptee

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
private static ScriptObject wrapAdaptee(final ScriptObject adaptee) {
    return new JO(adaptee);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:NativeJSAdapter.java

示例5: getAllocatorClass

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
@Override
protected Class<? extends ScriptObject> getAllocatorClass() {
    return codegen.useDualFields() ? JD.class : JO.class;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:SpillObjectCreator.java

示例6: wrapAdaptee

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
private static ScriptObject wrapAdaptee(final ScriptObject adaptee) {
    return new JO(adaptee, Global.instance().getObjectMap());
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:4,代码来源:NativeJSAdapter.java

示例7: newObject

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
@Override
public ScriptObject newObject() {
    return new JO(getObjectPrototype(), getObjectMap());
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:5,代码来源:Global.java

示例8: newObject

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
/**
 * Create a new empty script object
 *
 * @return the new ScriptObject
 */
public ScriptObject newObject() {
    return new JO(getObjectPrototype(), JO.getInitialMap());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Global.java

示例9: newMap

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
/**
 * Public property map allocator. Used by nasgen generated code.
 *
 * <p>It is the caller's responsibility to make sure that {@code properties} does not contain
 * properties with keys that are valid array indices.</p>
 *
 * @param properties Collection of initial properties.
 * @return New {@link PropertyMap}.
 */
public static PropertyMap newMap(final Collection<Property> properties) {
    return properties == null || properties.isEmpty()? newMap() : newMap(properties, JO.class.getName(), 0, 0, 0);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:PropertyMap.java

示例10: newObject

import jdk.nashorn.internal.scripts.JO; //导入依赖的package包/类
/**
 * Create a new empty script object
 *
 * @return the new ScriptObject
 */
public ScriptObject newObject() {
    return useDualFields() ? new JD(getObjectPrototype()) : new JO(getObjectPrototype());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:Global.java


注:本文中的jdk.nashorn.internal.scripts.JO类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。