APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.tools.javac.comp

public Class TypeEnter

extends Object
implements Completer
Class Inheritance
All Implemented Interfaces
com.sun.tools.javac.code.Symbol.Completer
Imports
java.util.HashSet, .Set, java.util.function.BiConsumer, javax.tools.JavaFileObject, com.sun.tools.javac.code.*, .Directive.ExportsDirective, .Directive.RequiresDirective, .Scope.ImportFilter, .Scope.NamedImportScope, .Scope.StarImportScope, .Scope.WriteableScope, .Source.Feature, com.sun.tools.javac.code.Symbol.*, com.sun.tools.javac.code.Type.*, com.sun.tools.javac.comp.Annotate.AnnotationTypeMetadata, com.sun.tools.javac.tree.*, com.sun.tools.javac.tree.JCTree.*, com.sun.tools.javac.util.*, .DefinedBy.Api, .Dependencies.CompletionCause, .JCDiagnostic.DiagnosticFlag, .JCDiagnostic.DiagnosticPosition, com.sun.tools.javac.resources.CompilerProperties.Errors

This is the second phase of Enter, in which classes are completed by resolving their headers and entering their members in the into the class scope. See Enter for an overall overview. This class uses internal phases to process the classes. When a phase processes classes, the lower phases are not invoked until all classes pass through the current phase. Note that it is possible that upper phases are run due to recursive completion. The internal phases are: - ImportPhase: shallow pass through imports, adds information about imports the NamedImportScope and StarImportScope, but avoids queries about class hierarchy. - HierarchyPhase: resolves the supertypes of the given class. Does not handle type parameters of the class or type argument of the supertypes. - HeaderPhase: finishes analysis of the header of the given class by resolving type parameters, attributing supertypes including type arguments and scheduling full annotation attribution. This phase also adds a synthetic default constructor if needed and synthetic "this" field. - MembersPhase: resolves headers for fields, methods and constructors in the given class. Also generates synthetic enum members.

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract class
TypeEnter.AbstractHeaderPhase

Defines common utility methods used by the HierarchyPhase and HeaderPhase.

private abstract class
pack-priv class
pack-priv class
pack-priv static interface
private class
private class
private class
TypeEnter.ImportsPhase

Analyze import clauses.

private class
TypeEnter.MembersPhase

Enter member fields and methods of a class

pack-priv abstract class
pack-priv class
private class

Field Summary

Modifier and TypeField and Description
pack-priv boolean
allowDeprecationOnImport

Switch: should deprecation warnings be issued on import

private final Annotate
private final Attr
pack-priv static final boolean
checkClash

A switch to determine whether we check for package/class conflicts

private final Check
private final TypeEnter.ImportsPhase
pack-priv boolean
completionEnabled

A flag to disable completion from time to time during member enter, as we only need to look up types.

private final Dependencies
private final Enter
private final Log
private final TreeMaker
private final MemberEnter
private final Names
private final Symtab
private final Todo
private TypeEnter.Phase
private final TypeAnnotations
protected static final Context.Key<TypeEnter>
private final TypeEnvs
private final Types

Constructor Summary

AccessConstructor and Description
protected
TypeEnter(Context context)

Method Summary

Modifier and TypeMethod and Description
public void
complete(Symbol
The symbol of the class to be completed.
sym
)

Implements com.sun.tools.javac.code.Symbol.Completer.complete.

Complete entering a class.

pack-priv JCTree
protected void
pack-priv void
private Symbol.RecordComponent
getRecordComponentAt(Symbol.ClassSymbol sym, int componentPos)

private void
handleDeprecatedAnnotations(List<JCTree.JCAnnotation> annotations, Symbol sym)

If a list of annotations contains a reference to java.lang.Deprecated, set the DEPRECATED flag.

public static TypeEnter
instance(Context context)

private Symbol.MethodSymbol
lookupMethod(Symbol.TypeSymbol tsym, Name name, List<Type> argtypes)

public void
markDeprecated(Symbol sym, List<JCTree.JCAnnotation> annotations, Env<AttrContext> env)

Mark sym deprecated if annotations contain @Deprecated annotation.

private void
setFlagIfAttributeTrue(JCTree.JCAnnotation a, Symbol sym, Name attribute, long flag)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait