Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.jcmd.jmod - JCmd Tool
JDK 17 jdk.jcmd.jmod is the JMOD file for JDK 17 JCmd tool,
which can be invoked by the "jcmd" command.
JDK 17 JCmd tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jcmd.jmod.
JDK 17 JCmd tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JCmd source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jcmd.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/tools/jstat/ExpressionExecuter.java
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.tools.jstat;
import java.util.*;
import sun.jvmstat.monitor.*;
/**
* A class implementing the ExpressionEvaluator to evaluate an expression
* in the context of the available monitoring data.
*
* @author Brian Doherty
* @since 1.5
*/
public class ExpressionExecuter implements ExpressionEvaluator {
private static final boolean debug =
Boolean.getBoolean("ExpressionEvaluator.debug");
private MonitoredVm vm;
private HashMap<String, Object> map = new HashMap<String, Object>();
ExpressionExecuter(MonitoredVm vm) {
this.vm = vm;
}
/*
* evaluate the given expression.
*/
public Object evaluate(Expression e) {
if (e == null) {
return null;
}
if (debug) {
System.out.println("Evaluating expression: " + e);
}
if (e instanceof Literal) {
return ((Literal)e).getValue();
}
if (e instanceof Identifier) {
Identifier id = (Identifier)e;
if (map.containsKey(id.getName())) {
return map.get(id.getName());
} else {
// cache the data values for coherency of the values over
// the life of this expression executer.
Monitor m = (Monitor)id.getValue();
Object v = m.getValue();
map.put(id.getName(), v);
return v;
}
}
Expression l = e.getLeft();
Expression r = e.getRight();
Operator op = e.getOperator();
if (op == null) {
return evaluate(l);
} else {
double lval = ((Number)evaluate(l)).doubleValue();
double rval = ((Number)evaluate(r)).doubleValue();
double result = op.eval(lval, rval);
if (debug) {
System.out.println("Performed Operation: " + lval + op + rval
+ " = " + result);
}
return Double.valueOf(result);
}
}
}
⏎ sun/tools/jstat/ExpressionExecuter.java
Or download all of them as a single archive file:
File name: jdk.jcmd-17.0.5-src.zip File size: 51997 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jconsole.jmod - JConsole Tool
2023-08-17, ≈16🔥, 0💬
Popular Posts:
What Is ojdbc7.jar for Oracle 12c R1? ojdbc7.jar for Oracle 12c R1 is the JAR files of ojdbc.jar, JD...
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-s...
JDK 17 java.sql.jmod is the JMOD file for JDK 17 SQL (Structured Query Language) module. JDK 17 SQL ...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool. JDK 17 JDI tool com...