Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
JDK 11 jdk.compiler.jmod - Compiler Tool
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool,
which can be invoked by the "javac" command.
JDK 11 Compiler tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.compiler.jmod.
JDK 11 Compiler tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Compiler source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.compiler.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/sjavac/comp/PathAndPackageVerifier.java
/* * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.tools.sjavac.comp; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import javax.tools.JavaFileObject; import com.sun.source.tree.CompilationUnitTree; import com.sun.source.util.TaskEvent; import com.sun.source.util.TaskListener; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.JCFieldAccess; import com.sun.tools.javac.tree.JCTree.JCIdent; import com.sun.tools.javac.util.DefinedBy; import com.sun.tools.javac.util.DefinedBy.Api; import com.sun.tools.javac.util.Name; import com.sun.tools.sjavac.Log; public class PathAndPackageVerifier implements TaskListener { // Stores the set of compilation units whose source file path does not // match the package declaration. Set<CompilationUnitTree> misplacedCompilationUnits = new HashSet<>(); @Override @DefinedBy(Api.COMPILER_TREE) public void finished(TaskEvent e) { if (e.getKind() == TaskEvent.Kind.ANALYZE) { CompilationUnitTree cu = e.getCompilationUnit(); if (cu == null) return; JavaFileObject jfo = cu.getSourceFile(); if (jfo == null) return; // No source file -> package doesn't matter JCTree pkg = (JCTree) cu.getPackageName(); if (pkg == null) return; // Default package. See JDK-8048144. Path dir = Paths.get(jfo.toUri()).normalize().getParent(); if (!checkPathAndPackage(dir, pkg)) misplacedCompilationUnits.add(cu); } if (e.getKind() == TaskEvent.Kind.COMPILATION) { for (CompilationUnitTree cu : misplacedCompilationUnits) { Log.error("Misplaced compilation unit."); Log.error(" Directory: " + Paths.get(cu.getSourceFile().toUri()).getParent()); Log.error(" Package: " + cu.getPackageName()); } } } public boolean errorsDiscovered() { return misplacedCompilationUnits.size() > 0; } /* Returns true if dir matches pkgName. * * Examples: * (a/b/c, a.b.c) gives true * (i/j/k, i.x.k) gives false * * Currently (x/a/b/c, a.b.c) also gives true. See JDK-8059598. */ private boolean checkPathAndPackage(Path dir, JCTree pkgName) { Iterator<String> pathIter = new ParentIterator(dir); Iterator<String> pkgIter = new EnclosingPkgIterator(pkgName); while (pathIter.hasNext() && pkgIter.hasNext()) { if (!pathIter.next().equals(pkgIter.next())) return false; } return !pkgIter.hasNext(); /*&& !pathIter.hasNext() See JDK-8059598 */ } /* Iterates over the names of the parents of the given path: * Example: dir1/dir2/dir3 results in dir3 -> dir2 -> dir1 */ private static class ParentIterator implements Iterator<String> { Path next; ParentIterator(Path initial) { next = initial; } @Override public boolean hasNext() { return next != null; } @Override public String next() { String tmp = next.getFileName().toString(); next = next.getParent(); return tmp; } } /* Iterates over the names of the enclosing packages: * Example: pkg1.pkg2.pkg3 results in pkg3 -> pkg2 -> pkg1 */ private static class EnclosingPkgIterator implements Iterator<String> { JCTree next; EnclosingPkgIterator(JCTree initial) { next = initial; } @Override public boolean hasNext() { return next != null; } @Override public String next() { Name name; if (next instanceof JCIdent) { name = ((JCIdent) next).name; next = null; } else { JCFieldAccess fa = (JCFieldAccess) next; name = fa.name; next = fa.selected; } return name.toString(); } } }
⏎ com/sun/tools/sjavac/comp/PathAndPackageVerifier.java
Or download all of them as a single archive file:
File name: jdk.compiler-11.0.1-src.zip File size: 1347269 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.crypto.cryptoki.jmod - Crypto KI Module
2020-08-13, 83008👍, 0💬
Popular Posts:
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JDOM provides a solution for using XML from Java that is as simple as Java itself. There is no compe...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...
How to download and install JDK (Java Development Kit) 5? If you want to write Java applications, yo...
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...