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.javadoc.jmod - Java Document Tool
JDK 11 jdk.javadoc.jmod is the JMOD file for JDK 11 Java Document tool,
which can be invoked by the "javadoc" command.
JDK 11 Java Document tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.javadoc.jmod.
JDK 11 Java Document tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Java Document tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.javadoc.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/javadoc/main/ProgramElementDocImpl.java
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.tools.javadoc.main;
import java.lang.reflect.Modifier;
import java.text.CollationKey;
import com.sun.javadoc.*;
import com.sun.source.util.TreePath;
import com.sun.tools.javac.code.Attribute;
import com.sun.tools.javac.code.Symbol;
import com.sun.tools.javac.code.Symbol.ClassSymbol;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
import com.sun.tools.javac.util.Position;
/**
* Represents a java program element: class, interface, field,
* constructor, or method.
* This is an abstract class dealing with information common to
* these elements.
*
* <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>
*
* @see MemberDocImpl
* @see ClassDocImpl
*
* @author Robert Field
* @author Neal Gafter (rewrite)
* @author Scott Seligman (generics, enums, annotations)
*/
@Deprecated(since="9", forRemoval=true)
@SuppressWarnings("removal")
public abstract class ProgramElementDocImpl
extends DocImpl implements ProgramElementDoc {
private final Symbol sym;
// For source position information.
JCTree tree = null;
Position.LineMap lineMap = null;
// Cache for getModifiers().
private int modifiers = -1;
protected ProgramElementDocImpl(DocEnv env, Symbol sym, TreePath treePath) {
super(env, treePath);
this.sym = sym;
if (treePath != null) {
tree = (JCTree) treePath.getLeaf();
lineMap = ((JCCompilationUnit) treePath.getCompilationUnit()).lineMap;
}
}
@Override
void setTreePath(TreePath treePath) {
super.setTreePath(treePath);
this.tree = (JCTree) treePath.getLeaf();
this.lineMap = ((JCCompilationUnit) treePath.getCompilationUnit()).lineMap;
}
/**
* Subclasses override to identify the containing class
*/
protected abstract ClassSymbol getContainingClass();
/**
* Returns the flags in terms of javac's flags
*/
abstract protected long getFlags();
/**
* Returns the modifier flags in terms of java.lang.reflect.Modifier.
*/
protected int getModifiers() {
if (modifiers == -1) {
modifiers = DocEnv.translateModifiers(getFlags());
}
return modifiers;
}
/**
* Get the containing class of this program element.
*
* @return a ClassDocImpl for this element's containing class.
* If this is a class with no outer class, return null.
*/
public ClassDoc containingClass() {
if (getContainingClass() == null) {
return null;
}
return env.getClassDoc(getContainingClass());
}
/**
* Return the package that this member is contained in.
* Return "" if in unnamed package.
*/
public PackageDoc containingPackage() {
return env.getPackageDoc(getContainingClass().packge());
}
/**
* Get the modifier specifier integer.
*
* @see java.lang.reflect.Modifier
*/
public int modifierSpecifier() {
int modifiers = getModifiers();
if (isMethod() && containingClass().isInterface())
// Remove the implicit abstract modifier.
return modifiers & ~Modifier.ABSTRACT;
return modifiers;
}
/**
* Get modifiers string.
* <pre>
* Example, for:
* public abstract int foo() { ... }
* modifiers() would return:
* 'public abstract'
* </pre>
* Annotations are not included.
*/
public String modifiers() {
int modifiers = getModifiers();
if (isAnnotationTypeElement() ||
(isMethod() && containingClass().isInterface())) {
// Remove the implicit abstract modifier.
return Modifier.toString(modifiers & ~Modifier.ABSTRACT);
} else {
return Modifier.toString(modifiers);
}
}
/**
* Get the annotations of this program element.
* Return an empty array if there are none.
*/
public AnnotationDesc[] annotations() {
AnnotationDesc res[] = new AnnotationDesc[sym.getRawAttributes().length()];
int i = 0;
for (Attribute.Compound a : sym.getRawAttributes()) {
res[i++] = new AnnotationDescImpl(env, a);
}
return res;
}
/**
* Return true if this program element is public
*/
public boolean isPublic() {
int modifiers = getModifiers();
return Modifier.isPublic(modifiers);
}
/**
* Return true if this program element is protected
*/
public boolean isProtected() {
int modifiers = getModifiers();
return Modifier.isProtected(modifiers);
}
/**
* Return true if this program element is private
*/
public boolean isPrivate() {
int modifiers = getModifiers();
return Modifier.isPrivate(modifiers);
}
/**
* Return true if this program element is package private
*/
public boolean isPackagePrivate() {
return !(isPublic() || isPrivate() || isProtected());
}
/**
* Return true if this program element is static
*/
public boolean isStatic() {
int modifiers = getModifiers();
return Modifier.isStatic(modifiers);
}
/**
* Return true if this program element is final
*/
public boolean isFinal() {
int modifiers = getModifiers();
return Modifier.isFinal(modifiers);
}
/**
* Generate a key for sorting.
*/
CollationKey generateKey() {
String k = name();
// System.out.println("COLLATION KEY FOR " + this + " is \"" + k + "\"");
return env.doclocale.collator.getCollationKey(k);
}
}
⏎ com/sun/tools/javadoc/main/ProgramElementDocImpl.java
Or download all of them as a single archive file:
File name: jdk.javadoc-11.0.1-src.zip File size: 680806 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jcmd.jmod - JCmd Tool
2020-07-22, ≈116🔥, 0💬
Popular Posts:
The JDT project provides the tool plug-ins that implement a Java IDE supporting the development of a...
What is ojdbc.jar - JDBC Driver for Oracle? ojdbc.jar is a JDBC driver from Oracle that provides dat...
HttpComponents Core Source Code Files are provided in the source package file, httpcomponents-core-5...
JDK 17 jdk.compiler.jmod is the JMOD file for JDK 17 Compiler tool, which can be invoked by the "jav...
JRE 8 deploy.jar is the JAR file for JRE 8 Java Control Panel and other deploy tools. JRE (Java Runt...