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.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | Check.
A check context is an object that can be used to perform compatibility checks - depending on the check context, meaning of 'compatibility' might vary significantly. |
| private class | |
| private class | |
| pack-priv class | |
| private class | |
| pack-priv static class | Check.
This class represent a check context that is nested within another check context - useful to check sub-expressions. |
| pack-priv class | Check.
Filters method candidates for the "potentially ambiguous method" check |
| private class | |
| private class | Check.
This visitor will warn if a serialization-related field or method is declared in a suspicious or incorrect way. |
| private class | |
| pack-priv class | Check.
A visitor class for type validation. |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | allowModules
Are modules allowed |
| private final boolean | allowPrimitivePatterns
Are primitive patterns allowed |
| private final boolean | allowRecords
Are records allowed |
| private final boolean | allowSealed
Are sealed classes allowed |
| pack-priv Check. | basicHandler
Check context to be used when evaluating assignment/return statements |
| protected static final Context. | |
| private Map | compiled
A table mapping flat names of all compiled classes for each module in this run to their symbols; maintained from outside. |
| private Set | |
| private final DeferredAttr | |
| private static final Types. | denotableChecker
diamondTypeChecker: A type visitor that descends down the given type looking for non-denotable types. |
| private Name[] | |
| private final JCDiagnostic. | |
| public boolean | |
| private final Enter | |
| private Predicate | |
| private final JavaFileManager | |
| private static final int | |
| private static final boolean | |
| private boolean | importSuppression
Whether to force suppression of deprecation and preview warnings. |
| private final Infer | |
| pack-priv Types. | |
| private Lint | |
| private Map | |
| private final Log | |
| private Symbol. | |
| private final Names | |
| pack-priv Warner | |
| private final Preview | |
| private final Profile | |
| private final Resolve | |
| private static final int | |
| private final Source | |
| private final Symtab | |
| pack-priv char | syntheticNameChar
Character for synthetic names |
| private final Target | |
| private final TypeAnnotations | |
| private final Types | |
| private final boolean |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| private void | |
| private Object | |
| private boolean | |
| pack-priv BiPredicate | buildResponsiblePredicate(Type site, List<? extends Collection<Symbol.
Build a predicate that determines, given two methods that are members of the given class, whether the class should be held "responsible" if the methods are potentially ambiguous. |
| pack-priv JCDiagnostic. | Returns: An internationalized string.The overriding method. m,The overridden method. otherA customized "cannot override" error message. |
| public Warner | |
| pack-priv void | |
| private void | |
| pack-priv void | checkAllDefined(JCDiagnostic.
Position to be used for error reporting. pos,The class. cCheck that all abstract members of given class have definitions. |
| pack-priv void | |
| public void | |
| pack-priv Type | checkCastable(JCDiagnostic.
Position to be used for error reporting. pos,The type that is being cast. found, Type The target type of the cast. req)Check that a given type can be cast to a given target type. |
| pack-priv Type | checkCastable(JCDiagnostic.
|
| pack-priv void | checkClassBounds(JCDiagnostic.
Position to be used for error reporting. pos,The type whose interfaces are checked. type)Check that class c does not implement directly or indirectly the same parameterized interface with two different argument lists. |
| pack-priv void | checkClassBounds(JCDiagnostic.
Enter all interfaces of type `type' into the hash table `seensofar' with their class symbol as key and their type as value. |
| pack-priv Type | |
| private void | |
| public void | |
| pack-priv Type | checkClassType(JCDiagnostic.
Position to be used for error reporting. pos,The type to be checked. t)Check that type is a class or interface type. |
| pack-priv Type | checkClassType(JCDiagnostic.
Position to be used for error reporting. pos,The type to be checked. t, boolean True if type bounds are illegal here. noBounds)Check that type is a class or interface type. |
| pack-priv boolean | |
| public boolean | checkCompatibleAbstracts(JCDiagnostic.
Position to be used for error reporting. pos,The first argument type. t1, Type The second argument type. t2, Type site)Check that classes (or interfaces) do not each define an abstract method with same name and arguments but incompatible return types. |
| public void | checkCompatibleConcretes(JCDiagnostic.
Position to be used for error reporting. pos,The class type to be checked. site)Check that a class does not inherit two concrete methods with the same signature. |
| pack-priv void | checkCompatibleSupertypes(JCDiagnostic.
Position to be used for error reporting. pos,The class whose interfaces are checked. c)Check that all abstract methods implemented by a class are mutually compatible. |
| pack-priv Type | checkConstructorRefType(JCDiagnostic.
Check that type is a valid qualifier for a constructor reference expression |
| private void | checkCyclicConstructor(JCTree.
Look in the map to see if the given constructor is part of a call cycle. |
| pack-priv void | checkCyclicConstructors(JCTree.
Check for cycles in the graph of constructors calling other constructors. |
| pack-priv void | checkDefaultConstructor(Symbol.
Check for a default constructor in an exported package. |
| pack-priv void | |
| public boolean | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv Type | checkDiamond(JCTree.
Check that usage of diamond operator is correct (i.e. diamond should not be used with non-generic classes or in anonymous class creation expressions) |
| pack-priv List | Returns: the (possibly empty) list of non-denotable types.the type inferred using the diamond operator tCheck that the type inferred using the diamond operator does not contain non-denotable types such as captured types or intersection types. |
| pack-priv boolean | checkDisjoint(JCDiagnostic.
Position to be used for error reporting. pos,The set of flags to be checked. flags, long Conflicting flags set #1. set1, long Conflicting flags set #2. set2)Check that flag set does not contain elements of two conflicting sets. |
| pack-priv void | checkDivZero(final JCDiagnostic.
Position for error reporting. pos,The operator for the expression operator, Type The right hand operand for the expression operand)Check for division by integer constant zero |
| pack-priv void | |
| private boolean | checkExtends(Type
The type that should be bounded by bs. a, Type The bound. bound)Check that a type is within some bounds. |
| pack-priv long | checkFlags(long
The set of modifiers given in a definition. flags, Symbol The defined symbol. sym, JCTree The declaration tree)Check that given modifiers are legal for given symbol and return modifiers together with any implicit modifiers for that symbol. |
| pack-priv void | checkForBadAuxiliaryClassAccess(JCDiagnostic.
Check that an auxiliary class is not accessed from any other file than its own. |
| public void | |
| public void | |
| pack-priv void | checkHideClashes(JCDiagnostic.
Position to be used for error reporting. pos,The class whose methods are checked. site, Symbol.The method symbol to be checked. symCheck that all static methods accessible from 'site' are mutually compatible (JLS 8.4.8). |
| private boolean | checkIfIdentityIsExpected(JCDiagnostic.
Check if a type required an identity class |
| private void | checkIfTypeParamsRequiresIdentity(SymbolMetadata sm, List<JCTree.
|
| pack-priv void | checkImplementations(JCTree.
The class definition whose members are checked. treeCheck that all methods which implement some method conform to the method they implement. |
| pack-priv void | checkImplementations(JCTree tree, Symbol.
Check that all methods which implement some method in `ic' conform to the method they implement. |
| public void | |
| public void | |
| pack-priv void | checkImportsUnique(JCTree.
The toplevel tree for which the test should be performed. toplevelCheck that types imported through the ordinary imports don't clash with types imported by other (static or ordinary) imports. |
| public void | |
| pack-priv Type | |
| pack-priv void | checkLossOfPrecision(final JCDiagnostic.
Position for error reporting. pos,The computed type of the tree found, Type The computed type of the tree req)Check for possible loss of precission |
| pack-priv Type | checkMethod(final Type mtype, final Symbol sym, final Env<AttrContext> env, final List<JCTree.
|
| pack-priv void | |
| public void | |
| pack-priv void | checkModuleRequires(final JCDiagnostic.
|
| private boolean | |
| pack-priv void | checkNonCyclic(JCDiagnostic.
Position to be used for error reporting. pos,The type referred to. t)Check for cyclic references. |
| pack-priv void | |
| private void | |
| pack-priv void | |
| pack-priv void | checkNonCyclicElements(JCTree.
Check for cycles in the graph of annotation elements. |
| pack-priv void | |
| private boolean | Returns: True if the check completed on all attributed classesPosition to be used for error reporting. pos,The type referred to. t)Check for cyclic references. |
| pack-priv Type | checkNonVoid(JCDiagnostic.
Position to be used for error reporting. pos,The type to be checked. t)Check that type is different from 'void'. |
| pack-priv void | checkNotRepeated(JCDiagnostic.
Enter interface into into set. |
| pack-priv Type | checkNullOrRefType(JCDiagnostic.
Position to be used for error reporting. pos,The type to be checked. t)Check that type is a null or reference type. |
| pack-priv void | checkOutOfRangeShift(final JCDiagnostic.
Position for error reporting. pos,The operator for the expression operator, Type The right hand operand for the expression operand)Check for bit shifts using an out-of-range bit count. |
| pack-priv void | checkOverride(JCTree
The tree from which positions
are extracted for errors. tree, Symbol.The overriding method. m,The overridden method. other,The class of which the overriding method
is a member. originCheck that this method conforms with overridden method 'other'. |
| pack-priv void | checkOverride(Env<AttrContext> env, JCTree.
The tree from which positions are extracted
for errors. tree,The overriding method. mCheck that a given method conforms with any method it overrides. |
| pack-priv void | |
| pack-priv void | checkOverrideClashes(JCDiagnostic.
Position to be used for error reporting. pos,The class whose methods are checked. site, Symbol.The method symbol to be checked. symCheck that all non-override equivalent methods accessible from 'site' are mutually compatible (JLS 8.4.8/9.4.1). |
| pack-priv void | |
| pack-priv void | checkPotentiallyAmbiguousOverloads(JCTree.
Report warnings for potentially ambiguous method declarations in the given site. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | checkRedundantCast(Env<AttrContext> env, final JCTree.
Check for redundant casts (i.e. where source type is a subtype of target type) The problem should only be reported for non-292 cast |
| pack-priv Type | checkRefType(JCDiagnostic.
Position to be used for error reporting. pos,The type to be checked. t)Check that type is a reference type, i.e. a class, interface or array type or a type variable. |
| pack-priv List | checkRefTypes(List<JCTree.
Original trees, used for error reporting. trees,The types to be checked. types)Check that each type is a reference type, i.e. a class, interface or array type or a type variable. |
| pack-priv void | |
| pack-priv void | |
| public void | checkSerialStructure(JCTree.
Check structure of serialization declarations. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | checkSwitchCaseStructure(List<JCTree.
the cases that should be checked. casesVerify the case labels conform to the constraints. |
| pack-priv void | checkTransparentClass(JCDiagnostic.
Position for error reporting. pos,The symbol. c,The scope. s)Check that a class or interface does not hide a class or interface with same name in immediately enclosing local scope. |
| pack-priv void | checkTransparentVar(JCDiagnostic.
Position for error reporting. pos,The symbol. v,The scope. s)Check that variable does not hide variable with same name in immediately enclosing local scope. |
| public Type | checkType(JCDiagnostic.
Position to be used for error reporting. pos,The type that was found. found, Type The type that was required. req)Check that a given type is assignable to a given proto-type. |
| pack-priv Type | checkType(final JCDiagnostic.
|
| private boolean | checkTypeContainsImportableElement(Symbol.
|
| pack-priv boolean | checkUnique(JCDiagnostic.
Position for error reporting. pos,The symbol. sym, Scope The scope. s)Check that symbol is unique in given scope. |
| pack-priv boolean | checkUniqueClassName(JCDiagnostic.
Position for error reporting. pos,The class name. name, Scope The enclosing scope. s)Check that class does not have the same name as one of its enclosing classes, or as a class defined in its enclosing scope. |
| private boolean | checkUniqueImport(JCDiagnostic.
Position for error reporting. pos,A Scope containing types imported so far through
ordinary imports. ordinallyImportedSoFar, Scope A Scope containing types imported so far through
static imports. staticallyImportedSoFar, Scope The current file's top-level Scope topLevelScope, Symbol The symbol. sym, boolean Whether or not this was a static import staticImport)Check that single-type import is not already imported or top-level defined, but make an exception for two single-type imports which denote the same type. |
| public boolean | Returns: true if 't' is well-formedclass type to be checked t)Check that type 't' is a valid instantiation of a generic class (see JLS 4.5) |
| pack-priv void | |
| private void | checkVisible(JCDiagnostic.
|
| public void | |
| private void | |
| private void | closure(Type t, Map<Symbol.
Compute all the supertypes of t, indexed by type symbol (except those in typesSkip). |
| pack-priv <T> void | compareAndRemove(List<T>
mutable list of items list, ToIntBiFunction<? super T, ? super T> returns flag bit(s) to remove FIRST and/or SECOND comparer)Compare elements in a list pair-wise in order to remove some of them. |
| public Type | completionError(JCDiagnostic.
Position to be used for error reporting. pos,The failure to report. exReport a failure to complete a class. |
| public Warner | |
| private Name[] | |
| pack-priv List | |
| pack-priv void | duplicateErasureError(JCDiagnostic.
Report duplicate declaration error. |
| pack-priv void | |
| pack-priv List | |
| private Directive. | |
| private Symbol | firstDirectIncompatibility(JCDiagnostic.
Return the first method in t2 that conflicts with a method from t1. |
| private Symbol | Returns: symbol from t2 that conflicts with one in t1.The first type. t1, Type The second type. t2, Type The most derived type. site)Return the first method which is defined with same args but different return types in two given interfaces, or null if none exists. |
| private Type | |
| pack-priv Optional | |
| pack-priv Attribute. | |
| public Symbol. | |
| public Symbol. | |
| private Set | |
| pack-priv Name[] | |
| public Name[] | |
| private void | handleCyclic(Symbol.
Handle finding an inheritance cycle on a class by setting the class' and its supertypes' types to the error type. |
| pack-priv boolean | |
| pack-priv boolean | |
| private long | |
| public boolean | |
| pack-priv List | |
| public static Check | |
| public List | |
| pack-priv boolean | intersects(Type t, List<Type> ts)
Is given type a subtype or supertype of some of the types in given list? |
| private boolean | |
| private boolean | |
| private boolean | |
| pack-priv boolean | |
| private boolean | |
| private boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| private boolean | |
| private boolean | isTargetSubsetOf(Set<Name> s, Set<Name> t)
Checks that s is a subset of t, with respect to ElementType semantics, specifically {ANNOTATION_TYPE} is a subset of {TYPE}, and {TYPE_USE} covers the set {ANNOTATION_TYPE, TYPE, TYPE_USE, TYPE_PARAMETER}. |
| private boolean | |
| protected boolean | isTypeAnnotation(JCTree.
Is the annotation applicable to types? |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| private Type | |
| public Name | |
| pack-priv <C extends Collection | methodsGroupedByName(Type site, Predicate<Symbol> filter, Supplier<? extends C> groupMaker)
Gather all of site's methods, including overridden methods, grouped and sorted by name, after applying the given filter. |
| public void | |
| private boolean | |
| pack-priv boolean | potentiallyAmbiguousOverload(Type site, Symbol.
Report warnings for potentially ambiguous method declarations. |
| pack-priv static int | protection(long flags)
The level of access protection given by a flag set, where PRIVATE is highest and PUBLIC is lowest. |
| public void | |
| public void | |
| pack-priv <T> void | removePreempted(List<T>
mutable list of items list, BiPredicate<? super T, ? super T> decides if one item preempts another, causing the second one to be removed preempts)Remove elements in a list that are preempted by some other element in the list. |
| pack-priv boolean | |
| pack-priv Lint | |
| pack-priv Symbol. | |
| private boolean | |
| pack-priv boolean | |
| pack-priv Type | typeTagError(JCDiagnostic.
Position to be used for error reporting. pos,An internationalized string describing the type tag
required. required, Type The type that was found. type)Report an error that wrong type tag was found. |
| pack-priv JCDiagnostic. | Returns: An internationalized string.The overriding method. m,The overridden method. otherA customized "override" warning message. |
| pack-priv List | |
| pack-priv List | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | validate(List<? extends JCTree> trees, Env<AttrContext> env)
Visitor method: Validate a list of type expressions. |
| private void | validateAnnotation(JCTree.
Check an annotation of a symbol. |
| private boolean | |
| public boolean | Returns: true if this annotation tree is valid, otherwise falseThe annotation tree to check aCheck an annotation value. |
| pack-priv void | validateAnnotationMethod(JCDiagnostic.
"It is also a compile-time error if any method declared in an annotation type has a signature that is override-equivalent to that of any public or protected method declared in class Object or in the interface annotation.Annotation." |
| public void | validateAnnotations(List<JCTree.
Check the annotations of a symbol. |
| pack-priv void | |
| pack-priv void | validateAnnotationType(JCTree restype)
Annotation types are restricted to primitives, String, an enum, an annotation, Class, Class<? |
| pack-priv void | |
| private void | |
| private void | |
| private void | |
| public void | validateRepeatable(Symbol.
The (annotation)type declaration annotated with a @Repeatable s,the @Repeatable on 's' repeatable,where to report errors posValidate the proposed container 'repeatable' on the annotation type symbol 's'. |
| private void | validateRetention(Symbol.
|
| private void | validateTarget(Symbol.
|
| pack-priv boolean | |
| public void | |
| public void | validateTypeAnnotations(List<JCTree.
Check the type annotations. |
| private void | validateValue(Symbol.
|
| pack-priv void | varargsDuplicateError(JCDiagnostic.
Report array/varargs duplicate declaration |
| pack-priv JCDiagnostic. | Returns: An internationalized string.The overriding method. m,The overridden method. otherA customized "override" warning message. |
| pack-priv void | warnDeprecated(JCDiagnostic.
Position to be used for error reporting. pos,The deprecated symbol. sym)Warn about deprecated symbol. |
| public void | warnPreviewAPI(JCDiagnostic.
Position to be used for error reporting. pos,Log a preview warning. |
| public void | warnUnchecked(JCDiagnostic.
Position to be used for error reporting. pos,Warn about unchecked operation. |
| private boolean |