Class ClassScope
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope
- Direct Known Subclasses:
InterTypeScope
-
Nested Class Summary
Nested classes/interfaces inherited from class Scope
Scope.Substitutor -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanThis is the primary flag for detection of early construction contexts (JEP 513).booleanFields inherited from class Scope
AUTOBOX_COMPATIBLE, BLOCK_SCOPE, CLASS_SCOPE, COMPATIBLE, COMPATIBLE_IGNORING_MISSING_TYPE, COMPILATION_UNIT_SCOPE, compilationUnitScope, EQUAL_OR_MORE_SPECIFIC, kind, METHOD_SCOPE, MODULE_SCOPE, MORE_GENERIC, NOT_COMPATIBLE, NOT_REDUNDANT, NOT_RELATED, parent, VARARGS_COMPATIBLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddDepth()voidbuildAnonymousTypeBinding(SourceTypeBinding enclosingType, ReferenceBinding supertype) voidvoidcheckRedundantDefaultNullness(int nullBits, int sourceStart) Check whether the given null default is redundant at the given position inside this scope.booleandetectHierarchyCycle(TypeBinding superType, TypeReference reference) final MethodBindingbooleanhasDefaultNullnessFor(int location, int sourceStart) Answer a defaultNullness defined for the closest enclosing scope, using bits from Binding.NullnessDefaultMASK.For Java scopes, the invocationType is always the same as the enclosingSourceType This distinction is important for AspectJ's inter-type declarations For inter-type declarations, the invocationType is the lexically enclosing type.See also the contract ofProblemReporter.close().toString()Methods inherited from class Scope
boxing, classScope, collectClassesBeingInitialized, compareTypes, compilationUnitScope, compilerOptions, computeCompatibleMethod, connectTypeVariables, convertEliminatingTypeVariables, createArrayType, createArrayType, createTypeVariables, deferBoundCheck, enclosingClassScope, enclosingInstanceScope, enclosingLambdaScope, enclosingMethodScope, enclosingReceiverType, enclosingReferenceContext, enclosingSourceType, enclosingSwitchLabel, enterEarlyConstructionContext, environment, exclude, findDefaultAbstractMethod, findDirectMemberType, findExactMethod, findField, findField, findMemberType, findMethod, findMethod0, findMethodForArray, findMethodInSuperInterfaces, findPrivilegedHandler, findType, findTypeVariable, findVariable, getBaseType, getBinding, getCommonReferenceBinding, getConstructor, getConstructor0, getCurrentPackage, getDeclarationModifiers, getExactConstructor, getExactMethod, getField, getImplicitMethod, getJavaIoSerializable, getJavaLangAnnotationAnnotation, getJavaLangAssertionError, getJavaLangBoolean, getJavaLangByte, getJavaLangCharacter, getJavaLangClass, getJavaLangClassDesc, getJavaLangClassNotFoundException, getJavaLangCloneable, getJavaLangDouble, getJavaLangEnum, getJavaLangEnumDesc, getJavaLangError, getJavaLangFloat, getJavaLangIllegalArgumentException, getJavaLangIncompatibleClassChangeError, getJavaLangInteger, getJavaLangInvokeConstantBootstraps, getJavaLangInvokeLambdaMetafactory, getJavaLangInvokeMethodHandle, getJavaLangInvokeMethodHandlesLookup, getJavaLangInvokeSerializedLambda, getJavaLangInvokeStringConcatFactory, getJavaLangInvokeVarHandle, getJavaLangIterable, getJavaLangLong, getJavaLangNoClassDefFoundError, getJavaLangNoSuchFieldError, getJavaLangObject, getJavaLangRecord, getJavaLangReflectField, getJavaLangReflectMethod, getJavaLangRuntimeObjectMethods, getJavaLangRuntimeSwitchBootstraps, getJavaLangShort, getJavaLangString, getJavaLangStringBuffer, getJavaLangStringBuilder, getJavaLangThrowable, getJavaLangVoid, getJavaUtilIterator, getMatchingUninitializedType, getMemberType, getMethod, getOnlyPackage, getPackage, getStaticFactory, getType, getType, getType, getTypeOrPackage, greaterLowerBound, greaterLowerBound, hasDefaultNullnessForType, hasErasedCandidatesCollisions, include, isBoxingCompatibleWith, isDefinedInField, isDefinedInMethod, isDefinedInSameUnit, isDefinedInType, isInsideCase, isInsideDeprecatedCode, isInsideEarlyConstructionContext, isInStaticContext, isInterTypeScope, isLambdaScope, isLambdaSubscope, isSubtypeOfRawType, leaveEarlyConstructionContext, localCheckRedundantDefaultNullness, localNonNullByDefaultValue, lowerUpperBound, methodScope, minimalErasedCandidates, module, mostSpecificClassMethodBinding, mostSpecificInterfaceMethodBinding, mostSpecificMethodBinding, namedMethodScope, nearestEnclosingStaticScope, originalReferenceContext, outerMostClassScope, outerMostMethodScope, parameterCompatibilityLevel, parameterCompatibilityLevel, parameterCompatibilityLevelFromInference, recordNonNullByDefault, referenceCompilationUnit, referenceContext, resolvingGuardExpression, setParent, substitute, substitute, substitute, tagAsAccessingEnclosingInstanceStateOf, typeAnnotationsResolutionScope, validateNullAnnotation
-
Field Details
-
referenceContext
-
superTypeReference
-
resolvingPolyExpressionArguments
public boolean resolvingPolyExpressionArguments -
insideEarlyConstructionContext
public boolean insideEarlyConstructionContextThis is the primary flag for detection of early construction contexts (JEP 513). It is temporarily set on the scope of a class while processing statements of this class's early construction context (during resolveType(), analyseCode() and generateCode())Main access is via
Scope.enterEarlyConstructionContext(),Scope.leaveEarlyConstructionContext()andScope.isInsideEarlyConstructionContext(TypeBinding, boolean).For the case of
LambdaExpressionthis information is captured during resolve intoscopesInEarlyConstruction, for use during generateCode(), which doesn't have the context of the lambda declaration.All this is always active at compliance 23+, see
JavaFeature.FLEXIBLE_CONSTRUCTOR_BODIESfor details on where enablement is actually checked.
-
-
Constructor Details
-
ClassScope
-
-
Method Details
-
buildAnonymousTypeBinding
-
checkParameterizedSuperTypeCollisions
public void checkParameterizedSuperTypeCollisions() -
checkParameterizedTypeBounds
public void checkParameterizedTypeBounds() -
detectHierarchyCycle
-
problemReporter
Description copied from class:ScopeSee also the contract ofProblemReporter.close().- Specified by:
problemReporterin classScope
-
referenceType
-
enclosingMethod
-
hasDefaultNullnessFor
public boolean hasDefaultNullnessFor(int location, int sourceStart) Description copied from class:ScopeAnswer a defaultNullness defined for the closest enclosing scope, using bits from Binding.NullnessDefaultMASK.- Overrides:
hasDefaultNullnessForin classScope
-
checkRedundantDefaultNullness
Description copied from class:ScopeCheck whether the given null default is redundant at the given position inside this scope.- Overrides:
checkRedundantDefaultNullnessin classScope- Parameters:
nullBits- locally defined nullness default, see Binding.NullnessDefaultMASK- Returns:
- enclosing binding that already has a matching NonNullByDefault annotation,
or the special binding
Scope.NOT_REDUNDANT, indicating that a different enclosing nullness default was found, or null to indicate that no enclosing nullness default was found.
-
toString
-
addDepth
public int addDepth() -
invocationType
Description copied from class:ScopeFor Java scopes, the invocationType is always the same as the enclosingSourceType This distinction is important for AspectJ's inter-type declarations For inter-type declarations, the invocationType is the lexically enclosing type.- Overrides:
invocationTypein classScope
-