Example #1
0
/** Empty object class. */
public class JO extends ScriptObject {

  private static final PropertyMap map$ = PropertyMap.newMap();

  /**
   * Returns the initial property map to be used.
   *
   * @return the initial property map.
   */
  public static PropertyMap getInitialMap() {
    return map$;
  }

  /**
   * Constructor given an initial property map
   *
   * @param map the property map
   */
  public JO(final PropertyMap map) {
    super(map);
  }

  /**
   * Constructor given an initial prototype and an initial property map.
   *
   * @param proto the prototype object
   * @param map the property map
   */
  public JO(final ScriptObject proto, final PropertyMap map) {
    super(proto, map);
  }

  /**
   * Constructor that takes a pre-initialized spill pool. Used for by {@link SpillObjectCreator} for
   * intializing object literals
   *
   * @param map property map
   * @param primitiveSpill primitive spill pool
   * @param objectSpill reference spill pool
   */
  public JO(final PropertyMap map, final long[] primitiveSpill, final Object[] objectSpill) {
    super(map, primitiveSpill, objectSpill);
  }

  /**
   * A method handle of this method is passed to the ScriptFunction constructor.
   *
   * @param map the property map to use for allocatorMap
   * @return newly allocated ScriptObject
   */
  public static ScriptObject allocate(final PropertyMap map) {
    return new JO(map);
  }
}
Example #2
0
 static {
   final List<jdk2.nashorn.internal.runtime.Property> list = new ArrayList<>(3);
   list.add(
       AccessorProperty.create(
           "name",
           jdk2.nashorn.internal.runtime.Property.NOT_ENUMERABLE,
           virtualHandle("G$name", Object.class),
           virtualHandle("S$name", void.class, Object.class)));
   list.add(
       AccessorProperty.create(
           "message",
           jdk2.nashorn.internal.runtime.Property.NOT_ENUMERABLE,
           virtualHandle("G$message", Object.class),
           virtualHandle("S$message", void.class, Object.class)));
   $nasgenmap$ = PropertyMap.newMap(list);
 }
Example #3
0
 static {
   final List<jdk2.nashorn.internal.runtime.Property> list = new ArrayList<>(1);
   $nasgenmap$ = PropertyMap.newMap(list);
 }