Klasse MatchLocator
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.matching.MatchLocator
- Alle implementierten Schnittstellen:
ITypeRequestor
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic classstatic class -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungchar[][][]intstatic final intintorg.eclipse.core.runtime.IProgressMonitorlong -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungMatchLocator(SearchPattern pattern, SearchRequestor requestor, IJavaSearchScope scope, org.eclipse.core.runtime.IProgressMonitor progressMonitor) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaccept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) Add an additional binary typevoidaccept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) Add an additional compilation unit into the loop -> build compilation unit declarations, their bindings and record their results.voidaccept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Add additional source typesstatic SearchDocument[]addWorkingCopies(SearchPattern pattern, SearchDocument[] indexMatches, ICompilationUnit[] copies, SearchParticipant participant) protected Parserprotected BinaryTypeBindingcacheBinaryType(IType type, IBinaryType binaryType) static IBinaryTypeclassFileReader(IType type) protected char[][][]computeSuperTypeNames(IType focusType) protected IJavaElementcreateHandle(AbstractMethodDeclaration method, IJavaElement parent) Creates an IMethod from the given method declaration and type.protected IJavaElementcreateHandle(AbstractVariableDeclaration variableDeclaration, IJavaElement parent) Create an handle for a local variable declaration (may be a local variable or type parameter).protected IJavaElementcreateHandle(Annotation annotation, IAnnotatable parent) Create an handle for a local variable declaration (may be a local variable or type parameter).protected IJavaElementcreateHandle(FieldDeclaration fieldDeclaration, TypeDeclaration typeDeclaration, IJavaElement parent) Creates an IField from the given field declaration and type.protected IJavaElementcreateHandle(LambdaExpression lambdaExpression, IJavaElement parent) Creates an IMethod from the given lambda declaration and type.protected booleancreateHierarchyResolver(IType focusType, PossibleMatch[] possibleMatches) protected IJavaElementcreateImportHandle(ImportReference importRef) Creates an IImportDeclaration from the given import statementprotected IJavaElementCreates an IImportDeclaration from the given import statementprotected ITypecreateTypeHandle(String simpleTypeName) Creates an IType from the given simple top level type name.protected booleanencloses(IJavaElement element) static voidfindIndexMatches(SearchPattern pattern, Index index, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, boolean resolveDocumentName, org.eclipse.core.runtime.IProgressMonitor monitor) Query a given index for matching entries.static voidfindIndexMatches(SearchPattern pattern, Index index, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, org.eclipse.core.runtime.IProgressMonitor monitor) Query a given index for matching entries.protected IBinaryTypegetBinaryInfo(ClassFile classFile, org.eclipse.core.resources.IResource resource) protected ITypegetMethodBinding(MethodPattern methodPattern) protected voidgetMethodBodies(CompilationUnitDeclaration unit, MatchingNodeSet nodeSet) static IJavaElementgetProjectOrJar(IJavaElement element) protected TypeBindingprotected booleanhasAlreadyDefinedType(CompilationUnitDeclaration parsedUnit) voidinitialize(JavaProject project, int possibleMatchSize) Create a new parser for the given project, as well as a lookup environment.voidlocateMatches(SearchDocument[] searchDocuments) Locate the matches in the given files and report them using the search requestor.protected voidlocateMatches(JavaProject javaProject, PossibleMatch[] possibleMatches, int start, int length) protected voidlocateMatches(JavaProject javaProject, PossibleMatchSet matchSet, int expected) Locate the matches amongst the possible matches.protected voidlocatePackageDeclarations(SearchParticipant participant, IJavaProject[] projects) Locates the package declarations corresponding to this locator's pattern.protected voidlocatePackageDeclarations(SearchPattern searchPattern, SearchParticipant participant, IJavaProject[] projects) Locates the package declarations corresponding to the search pattern.protected ITypelookupType(ReferenceBinding typeBinding) newDeclarationMatch(IJavaElement element, Binding binding, int accuracy, int offset, int length) newDeclarationMatch(IJavaElement element, Binding binding, int accuracy, int offset, int length, SearchParticipant participant, org.eclipse.core.resources.IResource resource) newFieldReferenceMatch(IJavaElement enclosingElement, IJavaElement localElement, Binding enclosingBinding, int accuracy, int offset, int length, ASTNode reference) newLocalVariableReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, ASTNode reference) newMethodReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, boolean isConstructor, boolean isSynthetic, ASTNode reference) newModuleReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, ASTNode reference) newModuleReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, ASTNode reference) newPackageReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, ASTNode reference) newTypeParameterReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, ASTNode reference) newTypeReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, ASTNode reference) newTypeReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, ASTNode reference) protected booleanparseAndBuildBindings(PossibleMatch possibleMatch, boolean mustResolve) Add the possibleMatch to the loop -> build compilation unit declarations, their bindings and record their results.protected voidprocess(PossibleMatch possibleMatch, boolean bindingsWereCreated) static IJavaElementprojectOrJarFocus(SearchPattern pattern) protected voidpurgeMethodStatements(TypeDeclaration type, boolean checkEachMethod) protected voidCalled prior to the unit being resolved.protected voidreport(SearchMatch match) protected voidreportAccurateEnumConstructorReference(SearchMatch match, FieldDeclaration field, AllocationExpression allocation) Finds the accurate positions of each valid token in the source and reports a reference to this token to the search requestor.protected voidreportAccurateFieldReference(SearchMatch[] matches, QualifiedNameReference qNameRef) Finds the accurate positions of each valid token in the source and reports a reference to this token to the search requestor.protected voidreportAccurateParameterizedMethodReference(SearchMatch match, ASTNode statement, TypeReference[] typeArguments) Finds the accurate positions of the sequence of tokens given by qualifiedName in the source and reports a reference to this parameterized type name to the search requestor.protected voidreportAccurateParameterizedTypeReference(SearchMatch match, TypeReference typeRef, int index, TypeReference[] typeArguments) Finds the accurate positions of the sequence of tokens given by qualifiedName in the source and reports a reference to this parameterized type name to the search requestor.protected voidreportAccurateTypeReference(SearchMatch match, ASTNode typeRef, char[] name) Finds the accurate positions of the sequence of tokens given by qualifiedName in the source and reports a reference to this this qualified name to the search requestor.protected voidreportBinaryMemberDeclaration(org.eclipse.core.resources.IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) protected voidreportMatching(AbstractMethodDeclaration method, TypeDeclaration type, IJavaElement parent, int accuracy, boolean typeInHierarchy, MatchingNodeSet nodeSet) Visit the given method declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set) Note that the method declaration has already been checked.protected voidreportMatching(Annotation[] annotations, IJavaElement enclosingElement, IJavaElement[] otherElements, Binding elementBinding, MatchingNodeSet nodeSet, boolean matchedContainer, boolean enclosesElement) Report matching in annotations.protected voidreportMatching(CompilationUnitDeclaration unit, boolean mustResolve) Visit the given resolved parse tree and report the nodes that match the search pattern.protected voidreportMatching(FieldDeclaration field, FieldDeclaration[] otherFields, TypeDeclaration type, IJavaElement parent, int accuracy, boolean typeInHierarchy, MatchingNodeSet nodeSet) Visit the given field declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set)protected voidreportMatching(LambdaExpression lambdaExpression, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, boolean typeInHierarchy) protected voidreportMatching(ModuleDeclaration module, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) Visit the given module declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set)protected voidreportMatching(TypeDeclaration type, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) Visit the given type declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set)protected voidreportMatching(TypeParameter[] typeParameters, IJavaElement enclosingElement, IJavaElement parent, Binding binding, MatchingNodeSet nodeSet) Report matches in type parameters.protected voidreportMatchingSuperOrPermit(TypeReference superReference, IJavaElement enclosingElement, Binding elementBinding, MatchingNodeSet nodeSet, boolean matchedClassContainer) static voidsetFocus(SearchPattern pattern, IJavaElement focus) static voidsetIndexQualifierQuery(SearchPattern pattern, char[] queries) Sets the qualifier queries into pattern.protected booleantypeInHierarchy(ReferenceBinding binding) Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.internal.compiler.impl.ITypeRequestor
accept
-
Felddetails
-
MAX_AT_ONCE
public static final int MAX_AT_ONCE -
pattern
-
patternLocator
-
matchContainer
public int matchContainer -
requestor
-
scope
-
progressMonitor
public org.eclipse.core.runtime.IProgressMonitor progressMonitor -
workingCopies
-
handleFactory
-
allSuperTypeNames
public char[][][] allSuperTypeNames -
parser
-
nameEnvironment
-
nameLookup
-
lookupEnvironment
-
hierarchyResolver
-
options
-
numberOfMatches
public int numberOfMatches -
matchesToProcess
-
currentPossibleMatch
-
resultCollectorTime
public long resultCollectorTime
-
-
Konstruktordetails
-
MatchLocator
public MatchLocator(SearchPattern pattern, SearchRequestor requestor, IJavaSearchScope scope, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
-
-
Methodendetails
-
addWorkingCopies
public static SearchDocument[] addWorkingCopies(SearchPattern pattern, SearchDocument[] indexMatches, ICompilationUnit[] copies, SearchParticipant participant) -
setFocus
-
setIndexQualifierQuery
Sets the qualifier queries into pattern.- Siehe auch:
-
classFileReader
-
findIndexMatches
public static void findIndexMatches(SearchPattern pattern, Index index, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException Query a given index for matching entries. Assumes the sender has opened the index and will close when finished.- Löst aus:
IOException
-
findIndexMatches
public static void findIndexMatches(SearchPattern pattern, Index index, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, boolean resolveDocumentName, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException Query a given index for matching entries. Assumes the sender has opened the index and will close when finished.- Löst aus:
IOException
-
getProjectOrJar
-
projectOrJarFocus
-
accept
public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) Add an additional binary type- Angegeben von:
acceptin SchnittstelleITypeRequestor
-
accept
Add an additional compilation unit into the loop -> build compilation unit declarations, their bindings and record their results.- Angegeben von:
acceptin SchnittstelleITypeRequestor
-
accept
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Add additional source types- Angegeben von:
acceptin SchnittstelleITypeRequestor
-
basicParser
-
cacheBinaryType
protected BinaryTypeBinding cacheBinaryType(IType type, IBinaryType binaryType) throws JavaModelException - Löst aus:
JavaModelException
-
computeSuperTypeNames
-
createHandle
Creates an IMethod from the given lambda declaration and type. -
createHandle
Creates an IMethod from the given method declaration and type. -
createHandle
protected IJavaElement createHandle(FieldDeclaration fieldDeclaration, TypeDeclaration typeDeclaration, IJavaElement parent) Creates an IField from the given field declaration and type. -
createHandle
protected IJavaElement createHandle(AbstractVariableDeclaration variableDeclaration, IJavaElement parent) Create an handle for a local variable declaration (may be a local variable or type parameter). -
createHandle
Create an handle for a local variable declaration (may be a local variable or type parameter). -
createHierarchyResolver
-
createImportHandle
Creates an IImportDeclaration from the given import statement -
createPackageDeclarationHandle
Creates an IImportDeclaration from the given import statement -
createTypeHandle
Creates an IType from the given simple top level type name. -
encloses
-
getBinaryInfo
protected IBinaryType getBinaryInfo(ClassFile classFile, org.eclipse.core.resources.IResource resource) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
getFocusType
-
getMethodBodies
-
getType
-
getMethodBinding
-
hasAlreadyDefinedType
-
initialize
Create a new parser for the given project, as well as a lookup environment.- Löst aus:
JavaModelException
-
locateMatches
protected void locateMatches(JavaProject javaProject, PossibleMatch[] possibleMatches, int start, int length) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
locateMatches
protected void locateMatches(JavaProject javaProject, PossibleMatchSet matchSet, int expected) throws org.eclipse.core.runtime.CoreException Locate the matches amongst the possible matches.- Löst aus:
org.eclipse.core.runtime.CoreException
-
locateMatches
public void locateMatches(SearchDocument[] searchDocuments) throws org.eclipse.core.runtime.CoreException Locate the matches in the given files and report them using the search requestor.- Löst aus:
org.eclipse.core.runtime.CoreException
-
locatePackageDeclarations
protected void locatePackageDeclarations(SearchParticipant participant, IJavaProject[] projects) throws org.eclipse.core.runtime.CoreException Locates the package declarations corresponding to this locator's pattern.- Löst aus:
org.eclipse.core.runtime.CoreException
-
locatePackageDeclarations
protected void locatePackageDeclarations(SearchPattern searchPattern, SearchParticipant participant, IJavaProject[] projects) throws org.eclipse.core.runtime.CoreException Locates the package declarations corresponding to the search pattern.- Löst aus:
org.eclipse.core.runtime.CoreException
-
lookupType
-
newDeclarationMatch
public SearchMatch newDeclarationMatch(IJavaElement element, Binding binding, int accuracy, int offset, int length) -
newDeclarationMatch
public SearchMatch newDeclarationMatch(IJavaElement element, Binding binding, int accuracy, int offset, int length, SearchParticipant participant, org.eclipse.core.resources.IResource resource) -
newFieldReferenceMatch
public FieldReferenceMatch newFieldReferenceMatch(IJavaElement enclosingElement, IJavaElement localElement, Binding enclosingBinding, int accuracy, int offset, int length, ASTNode reference) -
newLocalVariableReferenceMatch
public SearchMatch newLocalVariableReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, ASTNode reference) -
newMethodReferenceMatch
public MethodReferenceMatch newMethodReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, boolean isConstructor, boolean isSynthetic, ASTNode reference) -
newPackageReferenceMatch
public PackageReferenceMatch newPackageReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, ASTNode reference) -
newTypeParameterReferenceMatch
public SearchMatch newTypeParameterReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, ASTNode reference) -
newTypeReferenceMatch
public TypeReferenceMatch newTypeReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, ASTNode reference) -
newTypeReferenceMatch
public TypeReferenceMatch newTypeReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, ASTNode reference) -
newModuleReferenceMatch
public ModuleReferenceMatch newModuleReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, int offset, int length, ASTNode reference) -
newModuleReferenceMatch
public ModuleReferenceMatch newModuleReferenceMatch(IJavaElement enclosingElement, Binding enclosingBinding, int accuracy, ASTNode reference) -
parseAndBuildBindings
protected boolean parseAndBuildBindings(PossibleMatch possibleMatch, boolean mustResolve) throws org.eclipse.core.runtime.CoreException Add the possibleMatch to the loop -> build compilation unit declarations, their bindings and record their results.- Löst aus:
org.eclipse.core.runtime.CoreException
-
process
protected void process(PossibleMatch possibleMatch, boolean bindingsWereCreated) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
purgeMethodStatements
-
reduceParseTree
Called prior to the unit being resolved. Reduce the parse tree where possible. -
getParticipant
-
report
- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportAccurateTypeReference
protected void reportAccurateTypeReference(SearchMatch match, ASTNode typeRef, char[] name) throws org.eclipse.core.runtime.CoreException Finds the accurate positions of the sequence of tokens given by qualifiedName in the source and reports a reference to this this qualified name to the search requestor.- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportAccurateParameterizedMethodReference
protected void reportAccurateParameterizedMethodReference(SearchMatch match, ASTNode statement, TypeReference[] typeArguments) throws org.eclipse.core.runtime.CoreException Finds the accurate positions of the sequence of tokens given by qualifiedName in the source and reports a reference to this parameterized type name to the search requestor.- Löst aus:
org.eclipse.core.runtime.CoreException- Seit:
- 3.1
-
reportAccurateParameterizedTypeReference
protected void reportAccurateParameterizedTypeReference(SearchMatch match, TypeReference typeRef, int index, TypeReference[] typeArguments) throws org.eclipse.core.runtime.CoreException Finds the accurate positions of the sequence of tokens given by qualifiedName in the source and reports a reference to this parameterized type name to the search requestor.- Löst aus:
org.eclipse.core.runtime.CoreException- Seit:
- 3.1
-
reportAccurateEnumConstructorReference
protected void reportAccurateEnumConstructorReference(SearchMatch match, FieldDeclaration field, AllocationExpression allocation) throws org.eclipse.core.runtime.CoreException Finds the accurate positions of each valid token in the source and reports a reference to this token to the search requestor. A token is valid if it has an accuracy which is not -1.- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportAccurateFieldReference
protected void reportAccurateFieldReference(SearchMatch[] matches, QualifiedNameReference qNameRef) throws org.eclipse.core.runtime.CoreException Finds the accurate positions of each valid token in the source and reports a reference to this token to the search requestor. A token is valid if it has an accuracy which is not -1.- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportBinaryMemberDeclaration
protected void reportBinaryMemberDeclaration(org.eclipse.core.resources.IResource resource, IMember binaryMember, Binding binaryMemberBinding, IBinaryType info, int accuracy) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(LambdaExpression lambdaExpression, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, boolean typeInHierarchy) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(AbstractMethodDeclaration method, TypeDeclaration type, IJavaElement parent, int accuracy, boolean typeInHierarchy, MatchingNodeSet nodeSet) throws org.eclipse.core.runtime.CoreException Visit the given method declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set) Note that the method declaration has already been checked.- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(Annotation[] annotations, IJavaElement enclosingElement, IJavaElement[] otherElements, Binding elementBinding, MatchingNodeSet nodeSet, boolean matchedContainer, boolean enclosesElement) throws org.eclipse.core.runtime.CoreException Report matching in annotations.- Parameter:
otherElements- TODO- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(CompilationUnitDeclaration unit, boolean mustResolve) throws org.eclipse.core.runtime.CoreException Visit the given resolved parse tree and report the nodes that match the search pattern.- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(FieldDeclaration field, FieldDeclaration[] otherFields, TypeDeclaration type, IJavaElement parent, int accuracy, boolean typeInHierarchy, MatchingNodeSet nodeSet) throws org.eclipse.core.runtime.CoreException Visit the given field declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set)- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(ModuleDeclaration module, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) throws org.eclipse.core.runtime.CoreException Visit the given module declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set)- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(TypeDeclaration type, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) throws org.eclipse.core.runtime.CoreException Visit the given type declaration and report the nodes that match exactly the search pattern (i.e. the ones in the matching nodes set)- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatching
protected void reportMatching(TypeParameter[] typeParameters, IJavaElement enclosingElement, IJavaElement parent, Binding binding, MatchingNodeSet nodeSet) throws org.eclipse.core.runtime.CoreException Report matches in type parameters.- Löst aus:
org.eclipse.core.runtime.CoreException
-
reportMatchingSuperOrPermit
protected void reportMatchingSuperOrPermit(TypeReference superReference, IJavaElement enclosingElement, Binding elementBinding, MatchingNodeSet nodeSet, boolean matchedClassContainer) throws org.eclipse.core.runtime.CoreException - Löst aus:
org.eclipse.core.runtime.CoreException
-
typeInHierarchy
-