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/ExpressionResolver.java
/*
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.tools.jstat;
import sun.jvmstat.monitor.*;
/**
* A class implementing the ExpressionEvaluator to resolve unresolved
* symbols in an Expression in the context of the available monitoring data.
* This class also performs some minimal optimizations of the expressions,
* such as simplification of constant subexpressions.
*
* @author Brian Doherty
* @since 1.5
*/
public class ExpressionResolver implements ExpressionEvaluator {
private static boolean debug = Boolean.getBoolean("ExpressionResolver.debug");
private MonitoredVm vm;
ExpressionResolver(MonitoredVm vm) {
this.vm = vm;
}
/*
* evaluate the given expression. evaluation in this case means
* to resolve the counter names in the expression
*/
public Object evaluate(Expression e) throws MonitorException {
if (e == null) {
return null;
}
if (debug) {
System.out.println("Resolving Expression:" + e);
}
if (e instanceof Identifier) {
Identifier id = (Identifier)e;
// check if it's already resolved
if (id.isResolved()) {
return id;
}
// look it up
Monitor m = vm.findByName(id.getName());
if (m == null) {
if (debug) {
System.err.println("Warning: Unresolved Symbol: "
+ id.getName() + " substituted NaN");
}
return new Literal(e.isRequired() ? 0.0d : Double.NaN);
}
if (m.getVariability() == Variability.CONSTANT) {
if (debug) {
System.out.println("Converting constant " + id.getName()
+ " to literal with value "
+ m.getValue());
}
return new Literal(m.getValue());
}
id.setValue(m);
return id;
}
if (e instanceof Literal) {
return e;
}
Expression l = null;
Expression r = null;
if (e.getLeft() != null) {
l = (Expression)evaluate(e.getLeft());
}
if (e.getRight() != null) {
r = (Expression)evaluate(e.getRight());
}
if (l != null && r != null) {
if ((l instanceof Literal) && (r instanceof Literal)) {
Literal ll = (Literal)l;
Literal rl = (Literal)r;
boolean warn = false;
Double nan = Double.valueOf(Double.NaN);
if (ll.getValue() instanceof String) {
warn = true; ll.setValue(nan);
}
if (rl.getValue() instanceof String) {
warn = true; rl.setValue(nan);
}
if (debug && warn) {
System.out.println("Warning: String literal in "
+ "numerical expression: "
+ "substitutied NaN");
}
// perform the operation
Number ln = (Number)ll.getValue();
Number rn = (Number)rl.getValue();
double result = e.getOperator().eval(ln.doubleValue(),
rn.doubleValue());
if (debug) {
System.out.println("Converting expression " + e
+ " (left = " + ln.doubleValue() + ")"
+ " (right = " + rn.doubleValue() + ")"
+ " to literal value " + result);
}
var literal = new Literal(result);
literal.setRequired(e.isRequired());
return literal;
}
}
if (l != null && r == null) {
return l;
}
e.setLeft(l);
e.setRight(r);
return e;
}
}
⏎ sun/tools/jstat/ExpressionResolver.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, ∼9974🔥, 0💬
Popular Posts:
What is the jaxp\TypeInfoWriter.java provided in the Apache Xerces package? I have Apache Xerces 2.1...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...
JDK 1.1 source code directory contains Java source code for JDK 1.1 core classes: "C:\fyicenter\jdk-...
Swingx is the SwingLabs Swing Component Extensions. JAR File Size and Download Location: File name: ...
layout.jar is a component in iText Java library to provide layout functionalities. iText Java librar...