Klasse MethodScope
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodScope
Specific block scope used for methods, constructors or clinits, representing
its outermost blockscope. Note also that such a scope will be provided to enclose
field initializers subscopes as well.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
Scope.Substitutor -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungintlong[]long[][]booleanbooleanbooleanbooleanbooleanintintVon Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope
blockStatement, EmulationPathToImplicitThis, enclosingCase, finallyInfo, insideTypeAnnotation, localIndex, locals, maxOffset, NoEnclosingInstanceInConstructorCall, NoEnclosingInstanceInStaticContext, offset, shiftScopes, startIndex, subscopeCount, subscopesVon Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
AUTOBOX_COMPATIBLE, BLOCK_SCOPE, CLASS_SCOPE, COMPATIBLE, COMPILATION_UNIT_SCOPE, compilationUnitScope, EQUAL_OR_MORE_SPECIFIC, kind, METHOD_SCOPE, MODULE_SCOPE, MORE_GENERIC, NOT_COMPATIBLE, NOT_REDUNDANT, NOT_RELATED, parent, VARARGS_COMPATIBLE -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungMethodScope(Scope parent, ReferenceContext context, boolean isStatic) MethodScope(Scope parent, ReferenceContext context, boolean isStatic, int lastVisibleFieldID) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcheckRedundantDefaultNullness(int nullBits, int sourceStart) Check whether the given null default is redundant at the given position inside this scope.voidcheckUnusedParameters(MethodBinding method) voidcomputeLocalVariablePositions(int initOffset, CodeStream codeStream) Compute variable positions in scopes given an initial position offset ignoring unused local variables.voiddetectAPILeaks(ASTNode typeNode, TypeBinding type) findField(TypeBinding receiverType, char[] fieldName, InvocationSite invocationSite, boolean needResolve) Overridden to detect the error case inside an explicit constructor call: class X { int i; X myX; X(X x) { this(i, myX.i, x.i); // same for super calls... only the first 2 field accesses are errors } }protected Object[]getSyntheticEnclosingArgumentOfLambda(ReferenceBinding targetEnclosingType) booleanhasDefaultNullnessFor(int location, int sourceStart) Answer a defaultNullness defined for the closest enclosing scope, using bits from Binding.NullnessDefaultMASK.booleanbooleanbooleanbooleanAnswer the problem reporter to use for raising new problems.final intrecordInitializationStates(FlowInfo flowInfo) Answer the reference method of this scope, or null if initialization scope or lambda scope.Answers the binding of the reference method or reference lambda expression.Answer the reference type of this scope.booleanshouldCheckAPILeaks(ReferenceBinding declaringClass, boolean memberIsPublic) Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope
addAnonymousType, addLocalType, addLocalVariable, addSubscope, adjustCurrentAndSubScopeLocalVariablePositions, adjustLocalVariablePositions, allowBlankFinalFieldAssignment, checkAppropriateMethodAgainstSupers, checkUnclosedCloseables, correlateTrackingVarsIfElse, emulateOuterAccess, findLocalType, findLocalVariableDeclarations, findVariable, getBinding, getBinding, getEmulationPath, getEmulationPath, hasResourceTrackers, isDuplicateLocalVariable, maxShiftedOffset, needBlankFinalFieldInitializationCheck, propagateInnerEmulation, pruneWrapperTrackingVar, registerTrackingVariable, removeTrackingVar, scopeIndex, toString, toStringVon Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
boxing, classScope, compareTypes, compilationUnitScope, compilerOptions, computeCompatibleMethod, computeCompatibleMethod, connectTypeVariables, convertEliminatingTypeVariables, createArrayType, createArrayType, createTypeVariables, deferBoundCheck, deferCheck, enclosingClassScope, enclosingLambdaScope, enclosingMethodScope, enclosingReceiverType, enclosingReferenceContext, enclosingSourceType, enclosingTopMostClassScope, environment, findDefaultAbstractMethod, findDirectMemberType, findExactMethod, findField, findMemberType, findMethod, findMethod0, findMethodForArray, findMethodInSuperInterfaces, findPrivilegedHandler, findType, findTypeVariable, getBaseType, getBinding, getCommonReferenceBinding, getConstructor, getConstructor0, getCurrentPackage, getDeclarationModifiers, getExactConstructor, getExactMethod, getField, getImplicitMethod, getJavaIoSerializable, getJavaLangAnnotationAnnotation, getJavaLangAssertionError, getJavaLangBoolean, getJavaLangByte, getJavaLangCharacter, getJavaLangClass, getJavaLangClassNotFoundException, getJavaLangCloneable, getJavaLangDouble, getJavaLangEnum, getJavaLangError, getJavaLangFloat, getJavaLangIllegalArgumentException, getJavaLangIncompatibleClassChangeError, getJavaLangInteger, getJavaLangInvokeLambdaMetafactory, getJavaLangInvokeMethodHandle, getJavaLangInvokeMethodHandlesLookup, getJavaLangInvokeSerializedLambda, getJavaLangInvokeVarHandle, getJavaLangIterable, getJavaLangLong, getJavaLangNoClassDefFoundError, getJavaLangNoSuchFieldError, getJavaLangObject, getJavaLangRecord, getJavaLangReflectField, getJavaLangReflectMethod, getJavaLangRuntimeObjectMethods, getJavaLangRuntimeSwitchBootstraps, getJavaLangShort, getJavaLangString, getJavaLangStringBuffer, getJavaLangStringBuilder, getJavaLangThrowable, getJavaLangVoid, getJavaUtilIterator, getMemberType, getMethod, getOnlyPackage, getPackage, getStaticFactory, getType, getType, getType, getTypeOrPackage, greaterLowerBound, greaterLowerBound, hasDefaultNullnessForType, hasErasedCandidatesCollisions, innermostSwitchCase, invocationType, isAcceptableMethod, isBoxingCompatibleWith, isDefinedInField, isDefinedInMethod, isDefinedInSameUnit, isDefinedInType, isInsideCase, isInsideDeprecatedCode, isInterTypeScope, isLambdaSubscope, isSubtypeOfRawType, localCheckRedundantDefaultNullness, localNonNullByDefaultValue, lowerUpperBound, methodScope, minimalErasedCandidates, module, mostSpecificClassMethodBinding, mostSpecificInterfaceMethodBinding, mostSpecificMethodBinding, namedMethodScope, originalReferenceContext, outerMostClassScope, outerMostMethodScope, parameterCompatibilityLevel, parameterCompatibilityLevel, parameterCompatibilityLevel, parameterCompatibilityLevel, recordNonNullByDefault, referenceCompilationUnit, referenceContext, setParent, substitute, substitute, substitute, tagAsAccessingEnclosingInstanceStateOf, typeAnnotationsResolutionScope, validateNullAnnotation
-
Felddetails
-
referenceContext
-
isStatic
public boolean isStatic -
isConstructorCall
public boolean isConstructorCall -
initializedField
-
lastVisibleFieldID
public int lastVisibleFieldID -
analysisIndex
public int analysisIndex -
isPropagatingInnerClassEmulation
public boolean isPropagatingInnerClassEmulation -
lastIndex
public int lastIndex -
definiteInits
public long[] definiteInits -
extraDefiniteInits
public long[][] extraDefiniteInits -
extraSyntheticArguments
-
hasMissingSwitchDefault
public boolean hasMissingSwitchDefault -
isCompactConstructorScope
public boolean isCompactConstructorScope
-
-
Konstruktordetails
-
MethodScope
-
MethodScope
public MethodScope(Scope parent, ReferenceContext context, boolean isStatic, int lastVisibleFieldID)
-
-
Methodendetails
-
checkUnusedParameters
-
computeLocalVariablePositions
Compute variable positions in scopes given an initial position offset ignoring unused local variables. Deal with arguments here, locals and subscopes are processed in BlockScope method -
findField
public FieldBinding findField(TypeBinding receiverType, char[] fieldName, InvocationSite invocationSite, boolean needResolve) Overridden to detect the error case inside an explicit constructor call: class X { int i; X myX; X(X x) { this(i, myX.i, x.i); // same for super calls... only the first 2 field accesses are errors } } -
getSyntheticEnclosingArgumentOfLambda
-
isInsideConstructor
public boolean isInsideConstructor() -
isInsideInitializer
public boolean isInsideInitializer() -
isLambdaScope
public boolean isLambdaScope()- Setzt außer Kraft:
isLambdaScopein KlasseScope
-
isInsideInitializerOrConstructor
public boolean isInsideInitializerOrConstructor() -
problemReporter
Answer the problem reporter to use for raising new problems. Note that as a side-effect, this updates the current reference context (unit, type or method) in case the problem handler decides it is necessary to abort.- Setzt außer Kraft:
problemReporterin KlasseBlockScope
-
recordInitializationStates
-
referenceMethod
Answer the reference method of this scope, or null if initialization scope or lambda scope. -
referenceMethodBinding
Answers the binding of the reference method or reference lambda expression. -
referenceType
Answer the reference type of this scope. It is the nearest enclosing type of this scope.- Setzt außer Kraft:
referenceTypein KlasseBlockScope
-
hasDefaultNullnessFor
public boolean hasDefaultNullnessFor(int location, int sourceStart) Beschreibung aus Klasse kopiert:ScopeAnswer a defaultNullness defined for the closest enclosing scope, using bits from Binding.NullnessDefaultMASK.- Setzt außer Kraft:
hasDefaultNullnessForin KlasseScope
-
checkRedundantDefaultNullness
Beschreibung aus Klasse kopiert:ScopeCheck whether the given null default is redundant at the given position inside this scope.- Setzt außer Kraft:
checkRedundantDefaultNullnessin KlasseScope- Parameter:
nullBits- locally defined nullness default, see Binding.NullnessDefaultMASKsourceStart-- Gibt zurück:
- 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.
-
shouldCheckAPILeaks
-
detectAPILeaks
-