Class SourceIndexerEnvironment
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.indexing.SourceIndexerEnvironment
- All Implemented Interfaces:
ITypeRequestor
What
SourceIndexer needs to resolve the documents of a project: its name environment and a lookup
environment.
Both are costly to create and to fill. The index manager therefore keeps the last one, to resolve the next
documents of the same project as a compiler would resolve the units of a batch: an indexer
acquires one to resolve a document, and
gives it back once the document is indexed, or if it is not
to be. This class tells whether an environment can be reused.
A document is to be resolved as it would be with a new name environment and a new lookup environment:
- the name environment is used as long as it is
up to date; - the lookup environment is replaced by an empty one, see
forgetTypes(), when the types it knows may not be the ones that a new one would find.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) Accept the resolved binary form for the requested type.voidaccept(ICompilationUnit unit, AccessRestriction accessRestriction) Accept the requested type's compilation unit.voidaccept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Accept the unresolved source forms for the requested type.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ITypeRequestor
acceptModifier and TypeMethodDescriptiondefault voidaccept(IModule module, LookupEnvironment environment) Accept the requested module, could come in in one of 3 different forms:IBinaryModuleISourceModuleIModule.AutoModule
-
Field Details
-
MAX_UNITS_PROPERTY
The number of units after which the lookup environment is replaced, to limit what it retains. With 1, each document is resolved in its own lookup environment. Set with the system property "jdt.core.indexManager.maxResolvedUnits".- See Also:
-
MAX_UNITS
public static volatile int MAX_UNITS -
KEEP_PROPERTY
Whether the index manager keeps an environment for the next document. If not, each document is resolved with a new name environment and a new lookup environment, as before environments were kept. Set with the system property "jdt.core.indexManager.keepSourceEnvironment".- See Also:
-
KEEP
public static volatile boolean KEEP
-
-
Method Details
-
accept
public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) Description copied from interface:ITypeRequestorAccept the resolved binary form for the requested type.- Specified by:
acceptin interfaceITypeRequestor
-
accept
Description copied from interface:ITypeRequestorAccept the requested type's compilation unit.- Specified by:
acceptin interfaceITypeRequestor
-
accept
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Description copied from interface:ITypeRequestorAccept the unresolved source forms for the requested type. Note that the multiple source forms can be answered, in case the target compilation unit contains multiple types. The first one is then guaranteed to be the one corresponding to the requested type.- Specified by:
acceptin interfaceITypeRequestor
-