Klasse BlockScope
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope
- Bekannte direkte Unterklassen:
CodeSnippetScope
,MethodScope
,ModuleScope
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
Scope.Substitutor
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final VariableBinding[]
Used only during analyseCode and only for checking if a resource was closed in a finallyBlock.boolean
int
int
static final VariableBinding[]
static final VariableBinding[]
int
int
int
Scope[]
Von 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
ModifiziererKonstruktorBeschreibungprotected
BlockScope
(int kind, Scope parent) BlockScope
(BlockScope parent) BlockScope
(BlockScope parent, boolean addToParentScope) BlockScope
(BlockScope parent, int variableCount) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal void
addAnonymousType
(TypeDeclaration anonymousType, ReferenceBinding superBinding) final void
addLocalType
(TypeDeclaration localType) final void
addLocalVariable
(LocalVariableBinding binding) void
addSubscope
(Scope childScope) void
void
adjustLocalVariablePositions
(int delta, boolean offsetAlreadyUpdated) final boolean
Answer true if the receiver is suitable for assigning final blank fields.void
checkAppropriateMethodAgainstSupers
(char[] selector, MethodBinding compileTimeMethod, TypeBinding[] parameters, InvocationSite site) 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?"void
checkUnclosedCloseables
(FlowInfo flowInfo, FlowContext flowContext, ASTNode location, BlockScope locationScope) At the end of a block check the closing-status of all tracked closeables that are declared in this block.void
correlateTrackingVarsIfElse
(FlowInfo thenFlowInfo, FlowInfo elseFlowInfo) If one branch of an if-else closes any AutoCloseable resource, and if the same resource is known to be null on the other branch mark it as closed, too, so that merging both branches indicates that the resource is always closed.void
emulateOuterAccess
(LocalVariableBinding outerLocalVariable) final ReferenceBinding
findLocalType
(char[] name) findLocalVariableDeclarations
(int position) Returns all declarations of most specific locals containing a given position in their source range.findVariable
(char[] variableName, InvocationSite invocationSite) getBinding
(char[][] compoundName, int mask, InvocationSite invocationSite, boolean needResolve) final Binding
getBinding
(char[][] compoundName, InvocationSite invocationSite) getEmulationPath
(LocalVariableBinding outerLocalVariable) Object[]
getEmulationPath
(ReferenceBinding targetEnclosingType, boolean onlyExactMatch, boolean denyEnclosingArgInConstructorCall) boolean
final boolean
isDuplicateLocalVariable
(char[] name) int
final boolean
Returns true if the context requires to check initialization of final blank fields.See also the contract ofProblemReporter.close()
.void
propagateInnerEmulation
(ReferenceBinding targetType, boolean isEnclosingInstanceSupplied) void
pruneWrapperTrackingVar
(FakedTrackingVariable trackingVariable) Unregister a wrapper resource without affecting its inner.int
registerTrackingVariable
(FakedTrackingVariable fakedTrackingVariable) Register a tracking variable and compute its id.void
removeTrackingVar
(FakedTrackingVariable trackingVariable) When are no longer interested in this tracking variable - remove it.int
toString()
toString
(int tab) Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Scope
boxing, checkRedundantDefaultNullness, classScope, compareTypes, compilationUnitScope, compilerOptions, computeCompatibleMethod, computeCompatibleMethod, connectTypeVariables, convertEliminatingTypeVariables, createArrayType, createArrayType, createTypeVariables, deferBoundCheck, enclosingClassScope, enclosingLambdaScope, enclosingMethodScope, enclosingReceiverType, enclosingReferenceContext, enclosingSourceType, enclosingTopMostClassScope, environment, findDefaultAbstractMethod, findDirectMemberType, findExactMethod, findField, 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, 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, getJavaLangRuntimeTemplateRuntimeBootstraps, getJavaLangShort, getJavaLangString, getJavaLangStringBuffer, getJavaLangStringBuilder, getJavaLangStringTemplateProcessor, getJavaLangThrowable, getJavaLangVoid, getJavaUtilIterator, getMemberType, getMethod, getOnlyPackage, getPackage, getStaticFactory, getType, getType, getType, getTypeOrPackage, greaterLowerBound, greaterLowerBound, hasDefaultNullnessFor, hasDefaultNullnessForType, hasErasedCandidatesCollisions, innermostSwitchCase, invocationType, isAcceptableMethod, isBoxingCompatibleWith, isDefinedInField, isDefinedInMethod, isDefinedInSameUnit, isDefinedInType, isInsideCase, isInsideDeprecatedCode, isInterTypeScope, isLambdaScope, isLambdaSubscope, isSubtypeOfRawType, lexicallyEnclosingMethodScope, 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
-
locals
-
localIndex
public int localIndex -
startIndex
public int startIndex -
offset
public int offset -
maxOffset
public int maxOffset -
shiftScopes
-
subscopes
-
subscopeCount
public int subscopeCount -
enclosingCase
-
EmulationPathToImplicitThis
-
NoEnclosingInstanceInConstructorCall
-
NoEnclosingInstanceInStaticContext
-
insideTypeAnnotation
public boolean insideTypeAnnotation -
blockStatement
-
finallyInfo
Used only during analyseCode and only for checking if a resource was closed in a finallyBlock.
-
-
Konstruktordetails
-
BlockScope
-
BlockScope
-
BlockScope
-
BlockScope
-
-
Methodendetails
-
addAnonymousType
-
addLocalType
-
addLocalVariable
-
addSubscope
-
allowBlankFinalFieldAssignment
Answer true if the receiver is suitable for assigning final blank fields. in other words, it is inside an initializer, a constructor or a clinit -
adjustLocalVariablePositions
public void adjustLocalVariablePositions(int delta, boolean offsetAlreadyUpdated) -
adjustCurrentAndSubScopeLocalVariablePositions
public void adjustCurrentAndSubScopeLocalVariablePositions(int delta) -
emulateOuterAccess
-
findLocalType
-
findLocalVariableDeclarations
Returns all declarations of most specific locals containing a given position in their source range. This code does not recurse in nested types. Returned array may have null values at trailing indexes. -
findVariable
- Setzt außer Kraft:
findVariable
in KlasseScope
-
getBinding
public Binding getBinding(char[][] compoundName, int mask, InvocationSite invocationSite, boolean needResolve) -
getBinding
-
getEmulationPath
-
getEmulationPath
public Object[] getEmulationPath(ReferenceBinding targetEnclosingType, boolean onlyExactMatch, boolean denyEnclosingArgInConstructorCall) -
isDuplicateLocalVariable
public final boolean isDuplicateLocalVariable(char[] name) -
maxShiftedOffset
public int maxShiftedOffset() -
needBlankFinalFieldInitializationCheck
Returns true if the context requires to check initialization of final blank fields. in other words, it is inside an initializer, a constructor or a clinit -
problemReporter
Beschreibung aus Klasse kopiert:Scope
See also the contract ofProblemReporter.close()
.- Angegeben von:
problemReporter
in KlasseScope
-
propagateInnerEmulation
public void propagateInnerEmulation(ReferenceBinding targetType, boolean isEnclosingInstanceSupplied) -
referenceType
-
scopeIndex
public int scopeIndex() -
toString
-
toString
-
registerTrackingVariable
Register a tracking variable and compute its id. -
removeTrackingVar
When are no longer interested in this tracking variable - remove it. -
pruneWrapperTrackingVar
Unregister a wrapper resource without affecting its inner. -
hasResourceTrackers
public boolean hasResourceTrackers() -
checkUnclosedCloseables
public void checkUnclosedCloseables(FlowInfo flowInfo, FlowContext flowContext, ASTNode location, BlockScope locationScope) At the end of a block check the closing-status of all tracked closeables that are declared in this block. Also invoked when entering unreachable code. -
correlateTrackingVarsIfElse
If one branch of an if-else closes any AutoCloseable resource, and if the same resource is known to be null on the other branch mark it as closed, too, so that merging both branches indicates that the resource is always closed. Example: FileReader fr1 = null; try {\n" + fr1 = new FileReader(someFile);" + fr1.read(buf);\n" + } finally {\n" + if (fr1 != null)\n" + try {\n" + fr1.close();\n" + } catch (IOException e) { // do nothing } // after this if statement fr1 is definitely not leaked } -
checkAppropriateMethodAgainstSupers
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod, TypeBinding[] parameters, InvocationSite site) 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?"
-