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

public Class Check

extends Object
Class Inheritance
Imports
java.util.*, java.util.function.BiConsumer, .BiPredicate, .Predicate, .Supplier, .ToIntBiFunction, java.util.stream.Collectors, .StreamSupport, javax.lang.model.element.ElementKind, .NestingKind, .Element, .TypeElement, javax.tools.JavaFileManager, com.sun.source.tree.CaseTree, com.sun.tools.javac.code.*, .Attribute.Compound, .Directive.ExportsDirective, .Directive.RequiresDirective, .Source.Feature, .Lint, .Lint.LintCategory, .Scope.WriteableScope, com.sun.tools.javac.code.Type.*, com.sun.tools.javac.code.Symbol.*, com.sun.tools.javac.comp.Annotate.AnnotationTypeMetadata, .DeferredAttr.DeferredAttrContext, com.sun.tools.javac.jvm.*, com.sun.tools.javac.resources.CompilerProperties, .CompilerProperties.Errors, .CompilerProperties.Fragments, .CompilerProperties.Warnings, .CompilerProperties.LintWarnings, com.sun.tools.javac.tree.*, com.sun.tools.javac.tree.JCTree.*, com.sun.tools.javac.util.*, .JCDiagnostic.DiagnosticFlag, .JCDiagnostic.DiagnosticPosition, .JCDiagnostic.Error, .JCDiagnostic.Fragment, .JCDiagnostic.LintWarning, .List, javax.lang.model.type.DeclaredType, javax.lang.model.util.ElementKindVisitor14

Type checking helper class for the attribution phase.

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
public static interface
Check.CheckContext

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.NestedCheckContext

This class represent a check context that is nested within another check context - useful to check sub-expressions.

pack-priv class
Check.PotentiallyAmbiguousFilter

Filters method candidates for the "potentially ambiguous method" check

private class
private class
Check.SerialTypeVisitor

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.Validator

A visitor class for type validation.

Field Summary

Modifier and TypeField 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.CheckContext
basicHandler

Check context to be used when evaluating assignment/return statements

protected static final Context.Key<Check>
private Map<Pair<Symbol.ModuleSymbol, Name>, Symbol.ClassSymbol>
compiled

A table mapping flat names of all compiled classes for each module in this run to their symbols; maintained from outside.

private Set<Name>
private final DeferredAttr
private static final Types.SimpleVisitor<Boolean, Void>
denotableChecker

diamondTypeChecker: A type visitor that descends down the given type looking for non-denotable types.

private Name[]
private final JCDiagnostic.Factory
public boolean
private final Enter
private Predicate<Symbol>
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.UnaryVisitor<Boolean>
private Lint
private Map<Pair<Name, Name>, Integer>
private final Log
private Symbol.MethodSymbol
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

Constructor Summary

AccessConstructor and Description
protected
Check(Context context)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
private void
assertConvertible(JCTree tree, Type actual, Type formal, Warner warn)

private Object
private boolean
pack-priv BiPredicate<Symbol.MethodSymbol, Symbol.MethodSymbol>
buildResponsiblePredicate(Type site, List<? extends Collection<Symbol.MethodSymbol>> methodGroups)

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.Fragment

Returns:

An internationalized string.
cannotOverride
(Symbol.MethodSymbol
The overriding method.
m
,
Symbol.MethodSymbol
The overridden method.
other
)

A customized "cannot override" error message.

public Warner
pack-priv void
checkAccessFromSerializableElement(final JCTree tree, boolean isLambda)

private void
checkAccessFromSerializableElementInner(final JCTree tree, boolean isLambda)

pack-priv void
checkAllDefined(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Symbol.ClassSymbol
The class.
c
)

Check that all abstract members of given class have definitions.

pack-priv void
public void
checkCanonical(JCTree tree)

Check that a qualified name is in canonical form (for import decls).

pack-priv Type
checkCastable(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
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
pack-priv void
checkClassBounds(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
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.DiagnosticPosition pos, Map<Symbol.TypeSymbol, Type> seensofar, Type type)

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.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The type to be checked.
t
)

Check that type is a class or interface type.

pack-priv Type
checkClassType(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
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.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
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.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
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.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The class whose interfaces are checked.
c
)

Check that all abstract methods implemented by a class are mutually compatible.

pack-priv Type
checkConstructorRefType(JCDiagnostic.DiagnosticPosition pos, Type t)

Check that type is a valid qualifier for a constructor reference expression

private void
checkCyclicConstructor(JCTree.JCClassDecl tree, Symbol ctor, Map<Symbol, Symbol> callMap)

Look in the map to see if the given constructor is part of a call cycle.

pack-priv void
checkCyclicConstructors(JCTree.JCClassDecl tree)

Check for cycles in the graph of constructors calling other constructors.

pack-priv void
checkDefaultConstructor(Symbol.ClassSymbol c, JCDiagnostic.DiagnosticPosition pos)

Check for a default constructor in an exported package.

pack-priv void
public boolean
pack-priv void
checkDeprecated(final JCDiagnostic.DiagnosticPosition pos, final Symbol other, final Symbol s)

pack-priv void
pack-priv void
pack-priv Type
checkDiamond(JCTree.JCNewClass tree, Type t)

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<Type>

Returns:

the (possibly empty) list of non-denotable types.
checkDiamondDenotable
(Type.ClassType
the type inferred using the diamond operator
t
)

Check 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.DiagnosticPosition
Position to be used for error reporting.
pos
,
long
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.DiagnosticPosition
Position for error reporting.
pos
,
Symbol
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
checkEmptyIf(JCTree.JCIf tree)

Check for empty statements after if

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.DiagnosticPosition pos, Env<AttrContext> env, Symbol.ClassSymbol c)

Check that an auxiliary class is not accessed from any other file than its own.

public void
public void
pack-priv void
checkHideClashes(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The class whose methods are checked.
site
,
Symbol.MethodSymbol
The method symbol to be checked.
sym
)

Check that all static methods accessible from 'site' are mutually compatible (JLS 8.4.8).

private boolean
checkIfIdentityIsExpected(JCDiagnostic.DiagnosticPosition pos, Type t, Lint lint)

Check if a type required an identity class

private void
pack-priv void
checkImplementations(JCTree.JCClassDecl
The class definition whose members are checked.
tree
)

Check that all methods which implement some method conform to the method they implement.

pack-priv void
checkImplementations(JCTree tree, Symbol.ClassSymbol origin, Symbol.ClassSymbol ic)

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.JCCompilationUnit
The toplevel tree for which the test should be performed.
toplevel
)

Check 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.DiagnosticPosition
Position for error reporting.
pos
,
Type
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.JCExpression> argtrees, final List<Type> argtypes, final boolean useVarargs, InferenceContext inferenceContext)

pack-priv void
public void
pack-priv void
private boolean
pack-priv void
checkNonCyclic(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The type referred to.
t
)

Check for cyclic references.

pack-priv void
private void
pack-priv void
pack-priv void
checkNonCyclicElements(JCTree.JCClassDecl tree)

Check for cycles in the graph of annotation elements.

pack-priv void
private boolean

Returns:

True if the check completed on all attributed classes
checkNonCyclicInternal
(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The type referred to.
t
)

Check for cyclic references.

pack-priv Type
checkNonVoid(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The type to be checked.
t
)

Check that type is different from 'void'.

pack-priv void
checkNotRepeated(JCDiagnostic.DiagnosticPosition pos, Type it, Set<Symbol> its)

Enter interface into into set.

pack-priv Type
checkNullOrRefType(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The type to be checked.
t
)

Check that type is a null or reference type.

pack-priv void
checkOutOfRangeShift(final JCDiagnostic.DiagnosticPosition
Position for error reporting.
pos
,
Symbol
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.MethodSymbol
The overriding method.
m
,
Symbol.MethodSymbol
The overridden method.
other
,
Symbol.ClassSymbol
The class of which the overriding method is a member.
origin
)

Check that this method conforms with overridden method 'other'.

pack-priv void
checkOverride(Env<AttrContext> env, JCTree.JCMethodDecl
The tree from which positions are extracted for errors.
tree
,
Symbol.MethodSymbol
The overriding method.
m
)

Check that a given method conforms with any method it overrides.

pack-priv void
pack-priv void
checkOverrideClashes(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
The class whose methods are checked.
site
,
Symbol.MethodSymbol
The method symbol to be checked.
sym
)

Check 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.JCClassDecl tree, Type site)

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.JCTypeCast tree)

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.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
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<Type>
checkRefTypes(List<JCTree.JCExpression>
Original trees, used for error reporting.
trees
,
List<Type>
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.JCClassDecl tree, Symbol.ClassSymbol c)

Check structure of serialization declarations.

pack-priv void
pack-priv void
pack-priv void
pack-priv void
checkSwitchCaseStructure(List<JCTree.JCCase>
the cases that should be checked.
cases
)

Verify the case labels conform to the constraints.

pack-priv void
checkTransparentClass(JCDiagnostic.DiagnosticPosition
Position for error reporting.
pos
,
Symbol.ClassSymbol
The symbol.
c
,
Scope
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.DiagnosticPosition
Position for error reporting.
pos
,
Symbol.VarSymbol
The symbol.
v
,
Scope
The scope.
s
)

Check that variable does not hide variable with same name in immediately enclosing local scope.

public Type
checkType(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Type
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.DiagnosticPosition pos, final Type found, final Type req, final Check.CheckContext checkContext)

private boolean
pack-priv boolean
checkUnique(JCDiagnostic.DiagnosticPosition
Position for error reporting.
pos
,
Symbol
The symbol.
sym
,
Scope
The scope.
s
)

Check that symbol is unique in given scope.

pack-priv boolean
checkUniqueClassName(JCDiagnostic.DiagnosticPosition
Position for error reporting.
pos
,
Name
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.DiagnosticPosition
Position for error reporting.
pos
,
Scope
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-formed
checkValidGenericType
(Type
class 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.DiagnosticPosition pos, Symbol what, Symbol.PackageSymbol inPackage, boolean inSuperType)

public void
private void
closure(Type t, Map<Symbol.TypeSymbol, Type> typeMap)

Compute all the supertypes of t, indexed by type symbol.

private void
closure(Type t, Map<Symbol.TypeSymbol, Type> typesSkip, Map<Symbol.TypeSymbol, Type> typeMap)

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.DiagnosticPosition
Position to be used for error reporting.
pos
,
Symbol.CompletionFailure
The failure to report.
ex
)

Report a failure to complete a class.

public Warner
private Name[]
pack-priv List<Type>
diff(List<Type> ts1, List<Type> ts2)

Form the difference of two type lists.

pack-priv void
duplicateErasureError(JCDiagnostic.DiagnosticPosition pos, Symbol sym1, Symbol sym2)

Report duplicate declaration error.

pack-priv void
duplicateError(JCDiagnostic.DiagnosticPosition pos, Symbol sym)

Report duplicate declaration error.

pack-priv List<Type>
excl(Type t, List<Type> ts)

Remove type set from type set list.

private Directive.ExportsDirective
private Symbol
firstDirectIncompatibility(JCDiagnostic.DiagnosticPosition pos, Type t1, Type t2, Type site)

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.
firstIncompatibility
(JCDiagnostic.DiagnosticPosition pos, Type
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<Set<Name>>
pack-priv Attribute.Array
public Symbol.ClassSymbol
public Symbol.ClassSymbol
private Set<Name>
pack-priv Name[]
getTargetNames(JCTree.JCAnnotation a)

Is the annotation applicable to the symbol?

public Name[]
private void
handleCyclic(Symbol.ClassSymbol c)

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
implicitEnumFinalFlag(JCTree tree)

Determine if this enum should be implicitly final.

public boolean
pack-priv List<Type>
incl(Type t, List<Type> ts)

Add type set to given type list, unless it is a subclass of some class in the list.

public static Check
instance(Context context)

public List<Type>
intersect(List<Type> ts1, List<Type> ts2)

Form the intersection of two type lists.

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
isExternalizable(Type t)

check if a type is a subtype of Externalizable, if that is available.

pack-priv boolean
isHandled(Type exc, List<Type> handled)

Is exc handled by given exception list?

pack-priv boolean
isOverrider(Symbol s)

Is s a method symbol that overrides a method in a superclass?

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.JCAnnotation a, boolean isTypeParameter)

Is the annotation applicable to types?

pack-priv boolean
isTypeAnnotation(Attribute a, boolean isTypeParameter)

pack-priv boolean
pack-priv boolean
isUnchecked(Symbol.ClassSymbol exc)

Is exc an exception symbol that need not be declared?

pack-priv boolean
isUnchecked(Type exc)

Is exc an exception type that need not be declared?

pack-priv boolean
isUnchecked(JCDiagnostic.DiagnosticPosition pos, Type exc)

Same, but handling completion failures.

private Type
public Name
localClassName(Symbol.ClassSymbol c)

Return name of local class.

pack-priv <C extends Collection<Symbol.MethodSymbol>> List<C>
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
patternDominated(JCTree.JCPattern existingPattern, JCTree.JCPattern currentPattern)

pack-priv boolean
potentiallyAmbiguousOverload(Type site, Symbol.MethodSymbol msym1, Symbol.MethodSymbol msym2)

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
setImportSuppression(boolean newImportSuppression)

pack-priv Lint
setLint(Lint newLint)

pack-priv Symbol.MethodSymbol
private boolean
pack-priv boolean
subset(Type t, List<Type> ts)

Is given type a subtype of some of the types in given list?

pack-priv Type
typeTagError(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
JCDiagnostic
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.Fragment

Returns:

An internationalized string.
uncheckedOverrides
(Symbol.MethodSymbol
The overriding method.
m
,
Symbol.MethodSymbol
The overridden method.
other
)

A customized "override" warning message.

pack-priv List<Type>
unhandled(List<Type>
The list of thrown exceptions.
thrown
,
List<Type>
The list of handled exceptions.
handled
)

Return all exceptions in thrown list that are not in handled list.

pack-priv List<Type>
union(List<Type> ts1, List<Type> ts2)

Form the union of two type set lists.

pack-priv void
validate(JCTree tree, Env<AttrContext> env)

Validate a type expression.

pack-priv void
validate(JCTree tree, Env<AttrContext> env, boolean checkRaw)

pack-priv void
validate(List<? extends JCTree> trees, Env<AttrContext> env)

Visitor method: Validate a list of type expressions.

private void
validateAnnotation(JCTree.JCAnnotation a, JCTree declarationTree, Symbol s)

Check an annotation of a symbol.

private boolean
public boolean

Returns:

true if this annotation tree is valid, otherwise false
validateAnnotationDeferErrors
(JCTree.JCAnnotation
The annotation tree to check
a
)

Check an annotation value.

pack-priv void
validateAnnotationMethod(JCDiagnostic.DiagnosticPosition pos, Symbol.MethodSymbol m)

"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.JCAnnotation> annotations, JCTree declarationTree, Symbol s)

Check the annotations of a symbol.

pack-priv void
validateAnnotationTree(JCTree tree)

Recursively validate annotations values

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.TypeSymbol
The (annotation)type declaration annotated with a @Repeatable
s
,
Attribute.Compound
the @Repeatable on 's'
repeatable
,
JCDiagnostic.DiagnosticPosition
where to report errors
pos
)

Validate the proposed container 'repeatable' on the annotation type symbol 's'.

private void
private void
pack-priv boolean
public void
validateTypeAnnotation(JCTree.JCAnnotation a, Symbol s, boolean isTypeParameter)

public void
validateTypeAnnotations(List<JCTree.JCAnnotation> annotations, Symbol s, boolean isTypeParameter)

Check the type annotations.

private void
pack-priv void
varargsDuplicateError(JCDiagnostic.DiagnosticPosition pos, Symbol sym1, Symbol sym2)

Report array/varargs duplicate declaration

pack-priv JCDiagnostic.Fragment

Returns:

An internationalized string.
varargsOverrides
(Symbol.MethodSymbol
The overriding method.
m
,
Symbol.MethodSymbol
The overridden method.
other
)

A customized "override" warning message.

pack-priv void
warnDeprecated(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
Symbol
The deprecated symbol.
sym
)

Warn about deprecated symbol.

public void
warnPreviewAPI(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
JCDiagnostic.LintWarning warnKey)

Log a preview warning.

public void
warnUnchecked(JCDiagnostic.DiagnosticPosition
Position to be used for error reporting.
pos
,
JCDiagnostic.LintWarning warnKey)

Warn about unchecked operation.

private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait