8080880: some docs cleanup for langtools
Minor cleanup for docs Reviewed-by: jjg
This commit is contained in:
parent
a7cf8786ff
commit
629ace2fd4
@ -874,8 +874,8 @@ public class JavacTrees extends DocTrees {
|
||||
/**
|
||||
* Returns the original type from the ErrorType object.
|
||||
* @param errorType The errorType for which we want to get the original type.
|
||||
* @returns TypeMirror corresponding to the original type, replaced by the ErrorType.
|
||||
* noType (type.tag == NONE) is returned if there is no original type.
|
||||
* @return TypeMirror corresponding to the original type, replaced by the ErrorType.
|
||||
* noType (type.tag == NONE) is returned if there is no original type.
|
||||
*/
|
||||
@DefinedBy(Api.COMPILER_TREE)
|
||||
public TypeMirror getOriginalType(javax.lang.model.type.ErrorType errorType) {
|
||||
|
@ -230,9 +230,11 @@ public abstract class Attribute implements AnnotationValue {
|
||||
/**
|
||||
* Returns a string representation of this annotation.
|
||||
* String is of one of the forms:
|
||||
* @com.example.foo(name1=val1, name2=val2)
|
||||
* @com.example.foo(val)
|
||||
* @com.example.foo
|
||||
* <pre>
|
||||
* {@code @com.example.foo(name1=val1, name2=val2)}
|
||||
* {@code @com.example.foo(val)}
|
||||
* {@code @com.example.foo}
|
||||
* </pre>
|
||||
* Omit parens for marker annotations, and omit "value=" when allowed.
|
||||
*/
|
||||
@DefinedBy(Api.LANGUAGE_MODEL)
|
||||
|
@ -461,7 +461,7 @@ public class TypeAnnotationPosition {
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this parameter.
|
||||
* @param index The index of the parameter.
|
||||
* @param parameter_index The index of the parameter.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
@ -479,7 +479,7 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a method formal parameter.
|
||||
*
|
||||
* @param onLambda The lambda for this parameter.
|
||||
* @param index The index of the parameter.
|
||||
* @param parameter_index The index of the parameter.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
@ -493,7 +493,7 @@ public class TypeAnnotationPosition {
|
||||
/**
|
||||
* Create a {@code TypeAnnotationPosition} for a method formal parameter.
|
||||
*
|
||||
* @param index The index of the parameter.
|
||||
* @param parameter_index The index of the parameter.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
@ -506,7 +506,7 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a method formal parameter.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param index The index of the parameter.
|
||||
* @param parameter_index The index of the parameter.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
methodParameter(final List<TypePathEntry> location,
|
||||
@ -535,8 +535,6 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a method reference.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this method reference.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
methodRef(final List<TypePathEntry> location) {
|
||||
@ -564,8 +562,6 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a constructor reference.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this constructor reference.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
constructorRef(final List<TypePathEntry> location) {
|
||||
@ -720,8 +716,6 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a resource variable.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
resourceVariable(final List<TypePathEntry> location) {
|
||||
@ -748,8 +742,6 @@ public class TypeAnnotationPosition {
|
||||
/**
|
||||
* Create a {@code TypeAnnotationPosition} for a new.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition newObj(final int pos) {
|
||||
@ -760,8 +752,6 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a new.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
newObj(final List<TypePathEntry> location) {
|
||||
@ -792,7 +782,6 @@ public class TypeAnnotationPosition {
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param type_index The index of the interface.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
@ -854,8 +843,6 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for an instanceof.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
instanceOf(final List<TypePathEntry> location) {
|
||||
@ -885,9 +872,7 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a type cast.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param type_index The index into an intersection type.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
typeCast(final List<TypePathEntry> location,
|
||||
@ -984,9 +969,7 @@ public class TypeAnnotationPosition {
|
||||
* Create a {@code TypeAnnotationPosition} for a type parameter.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param parameter_index The index of the type parameter.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
typeParameter(final List<TypePathEntry> location,
|
||||
@ -1062,7 +1045,7 @@ public class TypeAnnotationPosition {
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param parameter_index The index of the type argument.
|
||||
* @param type_index The index of the type argument.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
@ -1081,9 +1064,7 @@ public class TypeAnnotationPosition {
|
||||
* type argument.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param parameter_index The index of the type argument.
|
||||
* @param pos The position from the associated tree node.
|
||||
* @param type_index The index of the type argument.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
methodRefTypeArg(final List<TypePathEntry> location,
|
||||
@ -1097,7 +1078,7 @@ public class TypeAnnotationPosition {
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param onLambda The lambda for this variable.
|
||||
* @param parameter_index The index of the type argument.
|
||||
* @param type_index The index of the type argument.
|
||||
* @param pos The position from the associated tree node.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
@ -1116,7 +1097,7 @@ public class TypeAnnotationPosition {
|
||||
* type argument.
|
||||
*
|
||||
* @param location The type path.
|
||||
* @param parameter_index The index of the type argument.
|
||||
* @param type_index The index of the type argument.
|
||||
*/
|
||||
public static TypeAnnotationPosition
|
||||
constructorRefTypeArg(final List<TypePathEntry> location,
|
||||
|
@ -279,7 +279,7 @@ public class Attr extends JCTree.Visitor {
|
||||
|
||||
/** Check that variable can be assigned to.
|
||||
* @param pos The current source code position.
|
||||
* @param v The assigned varaible
|
||||
* @param v The assigned variable
|
||||
* @param base If the variable is referred to in a Select, the part
|
||||
* to the left of the `.', null otherwise.
|
||||
* @param env The current environment.
|
||||
@ -759,7 +759,7 @@ public class Attr extends JCTree.Visitor {
|
||||
/**
|
||||
* Attribute a "lazy constant value".
|
||||
* @param env The env for the const value
|
||||
* @param initializer The initializer for the const value
|
||||
* @param variable The initializer for the const value
|
||||
* @param type The expected type, or null
|
||||
* @see VarSymbol#setLazyConstValue
|
||||
*/
|
||||
|
@ -1047,7 +1047,6 @@ public class JavaCompiler {
|
||||
/**
|
||||
* Process any annotations found in the specified compilation units.
|
||||
* @param roots a list of compilation units
|
||||
* @return an instance of the compiler in which to complete the compilation
|
||||
*/
|
||||
// Implementation note: when this method is called, log.deferredDiagnostics
|
||||
// will have been set true by initProcessAnnotations, meaning that any diagnostics
|
||||
@ -1194,7 +1193,7 @@ public class JavaCompiler {
|
||||
* Note that attributing classes may cause additional files to be
|
||||
* parsed and entered via the SourceCompleter.
|
||||
* Attribution of the entries in the list does not stop if any errors occur.
|
||||
* @returns a list of environments for attributd classes.
|
||||
* @return a list of environments for attribute classes.
|
||||
*/
|
||||
public Queue<Env<AttrContext>> attribute(Queue<Env<AttrContext>> envs) {
|
||||
ListBuffer<Env<AttrContext>> results = new ListBuffer<>();
|
||||
@ -1205,7 +1204,7 @@ public class JavaCompiler {
|
||||
|
||||
/**
|
||||
* Attribute a parse tree.
|
||||
* @returns the attributed parse tree
|
||||
* @return the attributed parse tree
|
||||
*/
|
||||
public Env<AttrContext> attribute(Env<AttrContext> env) {
|
||||
if (compileStates.isDone(env, CompileState.ATTR))
|
||||
@ -1245,7 +1244,7 @@ public class JavaCompiler {
|
||||
* Perform dataflow checks on attributed parse trees.
|
||||
* These include checks for definite assignment and unreachable statements.
|
||||
* If any errors occur, an empty list will be returned.
|
||||
* @returns the list of attributed parse trees
|
||||
* @return the list of attributed parse trees
|
||||
*/
|
||||
public Queue<Env<AttrContext>> flow(Queue<Env<AttrContext>> envs) {
|
||||
ListBuffer<Env<AttrContext>> results = new ListBuffer<>();
|
||||
@ -1315,7 +1314,7 @@ public class JavaCompiler {
|
||||
* Prepare attributed parse trees, in conjunction with their attribution contexts,
|
||||
* for source or code generation.
|
||||
* If any errors occur, an empty list will be returned.
|
||||
* @returns a list containing the classes to be generated
|
||||
* @return a list containing the classes to be generated
|
||||
*/
|
||||
public Queue<Pair<Env<AttrContext>, JCClassDecl>> desugar(Queue<Env<AttrContext>> envs) {
|
||||
ListBuffer<Pair<Env<AttrContext>, JCClassDecl>> results = new ListBuffer<>();
|
||||
|
@ -409,7 +409,7 @@ public class DocCommentParser {
|
||||
|
||||
/**
|
||||
* Read Java class name, possibly followed by member
|
||||
* Matching pairs of < > are skipped. The text is terminated by the first
|
||||
* Matching pairs of {@literal < >} are skipped. The text is terminated by the first
|
||||
* unmatched }. It is an error if the beginning of the next tag is detected.
|
||||
*/
|
||||
// TODO: boolean allowMember should be enum FORBID, ALLOW, REQUIRE
|
||||
|
@ -1411,7 +1411,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* Command line options suitable for presenting to annotation
|
||||
* processors.
|
||||
|
@ -168,7 +168,7 @@ public class JavacRoundEnvironment implements RoundEnvironment {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@DefinedBy(Api.ANNOTATION_PROCESSING)
|
||||
public Set<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a) {
|
||||
|
@ -2368,7 +2368,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
||||
}
|
||||
|
||||
/**
|
||||
* An intersection type, T1 & T2 & ... Tn (used in cast expressions)
|
||||
* An intersection type, {@code T1 & T2 & ... Tn} (used in cast expressions)
|
||||
*/
|
||||
public static class JCTypeIntersection extends JCExpression implements IntersectionTypeTree {
|
||||
|
||||
|
@ -61,7 +61,7 @@ import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticType.*;
|
||||
* Those implementations are specifically targeting JCDiagnostic objects.
|
||||
* <li> Provides basic support for i18n and a method for executing all locale-dependent conversions
|
||||
* <li> Provides the formatting logic for rendering the arguments of a JCDiagnostic object.
|
||||
* <ul>
|
||||
* </ul>
|
||||
*
|
||||
* <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.
|
||||
|
@ -44,7 +44,7 @@ import java.util.*;
|
||||
* instance method that is overridden in extended components. A base
|
||||
* phase supporting extension would look something like this:
|
||||
*
|
||||
* <p><pre>{@code
|
||||
* <pre>{@code
|
||||
* public class Phase {
|
||||
* protected static final Context.Key<Phase> phaseKey =
|
||||
* new Context.Key<Phase>();
|
||||
@ -70,7 +70,7 @@ import java.util.*;
|
||||
* and this must be done before any reference to the phase is accessed
|
||||
* using Phase.instance(). An extended phase might be declared thus:
|
||||
*
|
||||
* <p><pre>{@code
|
||||
* <pre>{@code
|
||||
* public class NewPhase extends Phase {
|
||||
* protected NewPhase(Context context) {
|
||||
* super(context);
|
||||
@ -87,7 +87,7 @@ import java.util.*;
|
||||
*
|
||||
* <p>And is registered early in the extended compiler like this
|
||||
*
|
||||
* <p><pre>
|
||||
* <pre>
|
||||
* NewPhase.preRegister(context);
|
||||
* </pre>
|
||||
*
|
||||
|
@ -28,7 +28,7 @@ package com.sun.tools.javac.util;
|
||||
/**
|
||||
* A hash table that maps Object to int.
|
||||
*
|
||||
* This is a custom hash table optimised for the Object -> int
|
||||
* This is a custom hash table optimised for the Object {@literal ->} int
|
||||
* maps. This is done to avoid unnecessary object allocation in the image set.
|
||||
*
|
||||
* @author Charles Turner
|
||||
@ -43,7 +43,7 @@ public class IntHashTable {
|
||||
private final static Object DELETED = new Object();
|
||||
|
||||
/**
|
||||
* Construct an Object -> int hash table.
|
||||
* Construct an Object {@literal ->} int hash table.
|
||||
*
|
||||
* The default size of the hash table is 64 mappings.
|
||||
*/
|
||||
@ -54,7 +54,7 @@ public class IntHashTable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an Object -> int hash table with a specified amount of mappings.
|
||||
* Construct an Object {@literal ->} int hash table with a specified amount of mappings.
|
||||
* @param capacity The number of default mappings in this hash table.
|
||||
*/
|
||||
public IntHashTable(int capacity) {
|
||||
|
@ -187,7 +187,7 @@ public class BuildState {
|
||||
|
||||
/**
|
||||
* Verify that the setModules method above did the right thing when
|
||||
* running through the module->package->source structure.
|
||||
* running through the {@literal module->package->source} structure.
|
||||
*/
|
||||
public void checkInternalState(String msg, boolean linkedOnly, Map<String,Source> srcs) {
|
||||
boolean baad = false;
|
||||
|
@ -131,7 +131,7 @@ public class Util {
|
||||
* do settings = cleanOptions("--server:",Util.set("-portfile"),settings);
|
||||
* now settings equals "--server:portfile=bar"
|
||||
*
|
||||
* @param allowsSubOptions A set of the allowed sub options, id portfile etc.
|
||||
* @param allowedSubOptions A set of the allowed sub options, id portfile etc.
|
||||
* @param s The option settings string.
|
||||
*/
|
||||
public static String cleanSubOptions(Set<String> allowedSubOptions, String s) {
|
||||
|
@ -128,12 +128,6 @@ public class SjavacClient implements Sjavac {
|
||||
|
||||
/**
|
||||
* Make a request to the server only to get the maximum possible heap size to use for compilations.
|
||||
*
|
||||
* @param port_file The port file used to synchronize creation of this server.
|
||||
* @param id The identify of the compilation.
|
||||
* @param out Standard out information.
|
||||
* @param err Standard err information.
|
||||
* @return The maximum heap size in bytes.
|
||||
*/
|
||||
@Override
|
||||
public SysInfo getSysInfo() {
|
||||
|
@ -161,7 +161,7 @@ public class Options {
|
||||
|
||||
/**
|
||||
* Get a map which maps suffixes to transformers (for example
|
||||
* ".java" -> CompileJavaPackages)
|
||||
* ".java" {@literal ->} CompileJavaPackages)
|
||||
*/
|
||||
public Map<String, Transformer> getTranslationRules() {
|
||||
return trRules;
|
||||
|
@ -78,7 +78,7 @@ public class PortFile {
|
||||
|
||||
/**
|
||||
* Create a new portfile.
|
||||
* @param filename is the path to the file.
|
||||
* @param fn is the path to the file.
|
||||
*/
|
||||
public PortFile(String fn) throws FileNotFoundException {
|
||||
filename = fn;
|
||||
|
@ -58,7 +58,6 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
|
||||
*
|
||||
* @param member the member to write type parameters for.
|
||||
* @param htmltree the content tree to which the parameters will be added.
|
||||
* @return the display length required to write this information.
|
||||
*/
|
||||
protected void addTypeParameters(ExecutableMemberDoc member, Content htmltree) {
|
||||
Content typeParameters = getTypeParameters(member);
|
||||
|
@ -325,7 +325,6 @@ public class ConfigurationImpl extends Configuration {
|
||||
* The options arrive as case-sensitive strings. For options that
|
||||
* are not case-sensitive, use toLowerCase() on the option string
|
||||
* before comparing it.
|
||||
* </blockquote>
|
||||
*
|
||||
* @return number of arguments + 1 for a option. Zero return means
|
||||
* option not known. Negative value means error occurred.
|
||||
|
@ -247,7 +247,7 @@ public class LinkInfoImpl extends LinkInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inherotDoc}
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected Content newContent() {
|
||||
return new ContentBuilder();
|
||||
|
@ -267,7 +267,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
|
||||
* navigation bar, and then the title (from the"-title"
|
||||
* option), at the top of page.
|
||||
*
|
||||
* @body the documentation tree to which the navigation bar header will be added
|
||||
* @param body the documentation tree to which the navigation bar header will be added
|
||||
*/
|
||||
protected void addNavigationBarHeader(Content body) {
|
||||
Content htmlTree = (configuration.allowTag(HtmlTag.HEADER))
|
||||
|
@ -58,7 +58,7 @@ public abstract class TagletWriter {
|
||||
public abstract Content getOutputInstance();
|
||||
|
||||
/**
|
||||
* Return the output for a {@code...} tag.
|
||||
* Return the output for a {@code {@code ...}} tag.
|
||||
*
|
||||
* @param tag the tag.
|
||||
* @return the output of the taglet.
|
||||
@ -80,7 +80,7 @@ public abstract class TagletWriter {
|
||||
protected abstract Content deprecatedTagOutput(Doc doc);
|
||||
|
||||
/**
|
||||
* Return the output for a {@literal...} tag.
|
||||
* Return the output for a {@code {@literal ...}} tag.
|
||||
*
|
||||
* @param tag the tag.
|
||||
* @return the output of the taglet.
|
||||
|
@ -100,9 +100,11 @@ public class AnnotationDescImpl implements AnnotationDesc {
|
||||
/**
|
||||
* Returns a string representation of this annotation.
|
||||
* String is of one of the forms:
|
||||
* @com.example.foo(name1=val1, name2=val2)
|
||||
* @com.example.foo(val)
|
||||
* @com.example.foo
|
||||
* <pre>
|
||||
* {@code @com.example.foo(name1=val1, name2=val2)}
|
||||
* {@code @com.example.foo(val)}
|
||||
* {@code @com.example.foo}
|
||||
* </pre>
|
||||
* Omit parens for marker annotations, and omit "value=" when allowed.
|
||||
*/
|
||||
@Override
|
||||
|
@ -1278,8 +1278,8 @@ public class ClassDocImpl extends ProgramElementDocImpl implements ClassDoc {
|
||||
* each Serializable field defined by an <code>ObjectStreamField</code>
|
||||
* array component of <code>serialPersistentField</code>.
|
||||
*
|
||||
* @returns an array of <code>FieldDoc</code> for the Serializable fields
|
||||
* of this class.
|
||||
* @return an array of {@code FieldDoc} for the Serializable fields
|
||||
* of this class.
|
||||
*
|
||||
* @see #definesSerializableFields()
|
||||
* @see SerialFieldTagImpl
|
||||
|
@ -36,7 +36,7 @@ import static com.sun.tools.classfile.ConstantPool.*;
|
||||
/**
|
||||
* A utility class to find where in a ClassFile references
|
||||
* a {@link CONSTANT_Methodref_info method},
|
||||
* a {@link CONSTANT_InterfaceMethodref_info interface method,
|
||||
* a {@link CONSTANT_InterfaceMethodref_info interface method},
|
||||
* or a {@link CONSTANT_Fieldref_info field}.
|
||||
*/
|
||||
public final class ReferenceFinder {
|
||||
|
Loading…
Reference in New Issue
Block a user