JDK 11 jdk.hotspot.agent.jmod - Hotspot Agent Module

JDK 11 jdk.hotspot.agent.jmod is the JMOD file for JDK 11 Hotspot Agent module.

JDK 11 Hotspot Agent module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.hotspot.agent.jmod.

JDK 11 Hotspot Agent module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 Hotspot Agent module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.hotspot.agent.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

sun/jvm/hotspot/utilities/soql/MapScriptObject.java

/*
 * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package sun.jvm.hotspot.utilities.soql;

import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
import java.lang.reflect.Method;
import java.lang.reflect.Constructor;
import javax.script.Invocable;

/**
 * Simple implementation of ScriptObject interface
 * with property storage backed by a Map. This class
 * can be extended to override any of the methods, in
 * particular to add "function" valued properties.
 */
public class MapScriptObject implements ScriptObject {
  // map to store the properties
  private Map map;

  public MapScriptObject() {
    this(new HashMap());
  }

  public MapScriptObject(Map map) {
    // make it synchronized
    this.map = Collections.synchronizedMap(map);
  }

  public Object[] getIds() {
    return map.keySet().toArray();
  }

  public Object get(String name) {
    if (has(name)) {
      return map.get(name);
    } else {
      return UNDEFINED;
    }
  }

  public Object get(int index) {
    if (has(index)) {
      Object key = Integer.valueOf(index);
      return map.get(key);
    } else {
      return UNDEFINED;
    }
  }

  public void put(String name, Object value) {
    map.put(name, value);
  }

  public void put(int index, Object value) {
    map.put(Integer.valueOf(index), value);
  }

  public boolean has(String name) {
    return map.containsKey(name);
  }

  public boolean has(int index) {
    return map.containsKey(Integer.valueOf(index));
  }

  public boolean delete(String name) {
    if (map.containsKey(name)) {
      map.remove(name);
      return true;
    } else {
      return false;
    }
  }

  public boolean delete(int index) {
    Object key = Integer.valueOf(index);
    if (map.containsKey(key)) {
      map.remove(key);
      return true;
    } else {
      return false;
    }
  }

  // add a function valued property that invokes given Method
  protected void putFunction(Object target, Method method) {
    putFunction(target, method, true);
  }

  // add a function valued property that invokes given Method
  protected void putFunction(Object target, Method method, boolean wrapArgs) {
    map.put(method.getName(), new MethodCallable(target, method, wrapArgs));
  }

  // add a function valued property that invokes given script function
  protected void putFunction(Object target, String name, Invocable invocable) {
    map.put(name, new InvocableCallable(target, name, invocable));
  }
}

sun/jvm/hotspot/utilities/soql/MapScriptObject.java

 

Or download all of them as a single archive file:

File name: jdk.hotspot.agent-11.0.1-src.zip
File size: 1243786 bytes
Release date: 2018-11-04
Download 

 

JDK 11 jdk.httpserver.jmod - HTTP Server Module

JDK 11 jdk.editpad.jmod - Edit Pad Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-02-29, 131248👍, 0💬