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.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/javac/comp/Todo.java
/*
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.tools.javac.comp;
import java.util.AbstractQueue;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import javax.tools.JavaFileObject;
import com.sun.tools.javac.util.Context;
/** A queue of all as yet unattributed classes.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public class Todo extends AbstractQueue<Env<AttrContext>> {
/** The context key for the todo list. */
protected static final Context.Key<Todo> todoKey = new Context.Key<>();
/** Get the Todo instance for this context. */
public static Todo instance(Context context) {
Todo instance = context.get(todoKey);
if (instance == null)
instance = new Todo(context);
return instance;
}
/** Create a new todo list. */
protected Todo(Context context) {
context.put(todoKey, this);
}
public void append(Env<AttrContext> env) {
add(env);
}
@Override
public Iterator<Env<AttrContext>> iterator() {
return contents.iterator();
}
@Override
public int size() {
return contents.size();
}
public boolean offer(Env<AttrContext> e) {
if (contents.add(e)) {
if (contentsByFile != null)
addByFile(e);
return true;
} else {
return false;
}
}
/**
* Removes all unattributed classes except those belonging to the given
* collection of files.
*
* @param sourceFiles The source files of the classes to keep.
*/
public void retainFiles(Collection<? extends JavaFileObject> sourceFiles) {
for (Iterator<Env<AttrContext>> it = contents.iterator(); it.hasNext(); ) {
Env<AttrContext> env = it.next();
if (!sourceFiles.contains(env.toplevel.sourcefile)) {
if (contentsByFile != null) removeByFile(env);
it.remove();
}
}
}
public Env<AttrContext> poll() {
if (size() == 0)
return null;
Env<AttrContext> env = contents.remove(0);
if (contentsByFile != null)
removeByFile(env);
return env;
}
public Env<AttrContext> peek() {
return (size() == 0 ? null : contents.get(0));
}
public Queue<Queue<Env<AttrContext>>> groupByFile() {
if (contentsByFile == null) {
contentsByFile = new LinkedList<>();
for (Env<AttrContext> env: contents) {
addByFile(env);
}
}
return contentsByFile;
}
private void addByFile(Env<AttrContext> env) {
JavaFileObject file = env.toplevel.sourcefile;
if (fileMap == null)
fileMap = new HashMap<>();
FileQueue fq = fileMap.get(file);
if (fq == null) {
fq = new FileQueue();
fileMap.put(file, fq);
contentsByFile.add(fq);
}
fq.fileContents.add(env);
}
private void removeByFile(Env<AttrContext> env) {
JavaFileObject file = env.toplevel.sourcefile;
FileQueue fq = fileMap.get(file);
if (fq == null)
return;
if (fq.fileContents.remove(env)) {
if (fq.isEmpty()) {
fileMap.remove(file);
contentsByFile.remove(fq);
}
}
}
LinkedList<Env<AttrContext>> contents = new LinkedList<>();
LinkedList<Queue<Env<AttrContext>>> contentsByFile;
Map<JavaFileObject, FileQueue> fileMap;
class FileQueue extends AbstractQueue<Env<AttrContext>> {
@Override
public Iterator<Env<AttrContext>> iterator() {
return fileContents.iterator();
}
@Override
public int size() {
return fileContents.size();
}
public boolean offer(Env<AttrContext> e) {
if (fileContents.offer(e)) {
contents.add(e);
return true;
}
return false;
}
public Env<AttrContext> poll() {
if (fileContents.size() == 0)
return null;
Env<AttrContext> env = fileContents.remove(0);
contents.remove(env);
return env;
}
public Env<AttrContext> peek() {
return (fileContents.size() == 0 ? null : fileContents.get(0));
}
LinkedList<Env<AttrContext>> fileContents = new LinkedList<>();
}
}
⏎ com/sun/tools/javac/comp/Todo.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, ≈196🔥, 0💬
Popular Posts:
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module. JDK 11 Base module compiled class fil...
What is the jaxp\SourceValidator.jav aprovided in the Apache Xerces package? I have Apache Xerces 2....
JDK 11 jdk.jshell.jmod is the JMOD file for JDK 11 JShell tool, which can be invoked by the "jshell"...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...
JDK 11 jdk.internal.vm.compiler .jmodis the JMOD file for JDK 11 Internal VM Compiler module. JDK 11...