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 11 jdk.jcmd.jmod - JCmd Tool
JDK 11 jdk.jcmd.jmod is the JMOD file for JDK 11 JCmd tool,
which can be invoked by the "jcmd" command.
JDK 11 JCmd tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jcmd.jmod.
JDK 11 JCmd tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JCmd source code files are stored in \fyicenter\jdk-11.0.1\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/HeaderClosure.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 sun.jvmstat.monitor.MonitorException;
/**
* A class implementing the Closure interface that visits the nodes of
* the nodes of a ColumFormat object and computes the header string for
* the columns of data.
*
* @author Brian Doherty
* @since 1.5
*/
public class HeaderClosure implements Closure {
private static final char ALIGN_CHAR = '^';
private StringBuilder header = new StringBuilder();
/*
* visit an object to perform some operation. In this case, the
* object is a ColumnFormat we are building the header string.
*/
public void visit(Object o, boolean hasNext) throws MonitorException {
if (! (o instanceof ColumnFormat)) {
return;
}
ColumnFormat c = (ColumnFormat)o;
String h = c.getHeader();
// check for special alignment character
if (h.indexOf(ALIGN_CHAR) >= 0) {
int len = h.length();
if ((h.charAt(0) == ALIGN_CHAR)
&& (h.charAt(len-1) == ALIGN_CHAR)) {
// ^<header>^ case - center alignment
c.setWidth(Math.max(c.getWidth(),
Math.max(c.getFormat().length(), len-2)));
h = h.substring(1, len-1);
h = Alignment.CENTER.align(h, c.getWidth());
} else if (h.charAt(0) == ALIGN_CHAR) {
// ^<header> case - left alignment
c.setWidth(Math.max(c.getWidth(),
Math.max(c.getFormat().length(), len-1)));
h = h.substring(1, len);
h = Alignment.LEFT.align(h, c.getWidth());
} else if (h.charAt(len-1) == ALIGN_CHAR) {
// <header>^ case - right alignment
c.setWidth(Math.max(c.getWidth(),
Math.max(c.getFormat().length(), len-1)));
h = h.substring(0, len-1);
h = Alignment.RIGHT.align(h, c.getWidth());
} else {
// an internal alignment character - ignore
}
} else {
// User has provided their own padding for alignment purposes
}
header.append(h);
if (hasNext) {
header.append(" ");
}
}
/*
* get the header string.
*/
public String getHeader() {
return header.toString();
}
}
⏎ sun/tools/jstat/HeaderClosure.java
Or download all of them as a single archive file:
File name: jdk.jcmd-11.0.1-src.zip File size: 47892 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jconsole.jmod - JConsole Tool
2020-07-07, ≈21🔥, 0💬
Popular Posts:
The Java Naming and Directory Interface (JNDI) is part of the Java platform, providing applications ...
Apache Ant is a Java-based build tool. In theory, it is kind of like make, without make's wrinkles. ...
How to download and install JDK (Java Development Kit) 8? If you want to write Java applications, yo...
What Is javamail1_1_3.zip? javamail1_1_3.zip is the binary package of JavaMail API 1.1.3 in ZIP form...
JDK 17 jdk.internal.vm.ci.jmod is the JMOD file for JDK 17 Internal VM CI module. JDK 17 Internal VM...