java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.matching.MatchLocator
Alle implementierten Schnittstellen:
ITypeRequestor

public class MatchLocator extends Object implements ITypeRequestor
  • Felddetails

    • MAX_AT_ONCE

      public static final int MAX_AT_ONCE
    • pattern

      public SearchPattern pattern
    • patternLocator

      public PatternLocator patternLocator
    • matchContainer

      public int matchContainer
    • requestor

      public SearchRequestor requestor
    • scope

      public IJavaSearchScope scope
    • progressMonitor

      public org.eclipse.core.runtime.IProgressMonitor progressMonitor
    • workingCopies

      public ICompilationUnit[] workingCopies
    • handleFactory

      public HandleFactory handleFactory
    • allSuperTypeNames

      public char[][][] allSuperTypeNames
    • parser

      public MatchLocatorParser parser
    • nameEnvironment

      public INameEnvironment nameEnvironment
    • nameLookup

      public NameLookup nameLookup
    • lookupEnvironment

      public LookupEnvironment lookupEnvironment
    • hierarchyResolver

      public HierarchyResolver hierarchyResolver
    • options

      public CompilerOptions options
    • numberOfMatches

      public int numberOfMatches
    • matchesToProcess

      public PossibleMatch[] matchesToProcess
    • currentPossibleMatch

      public PossibleMatch currentPossibleMatch
    • resultCollectorTime

      public long resultCollectorTime
  • Konstruktordetails

  • Methodendetails

    • addWorkingCopies

      public static SearchDocument[] addWorkingCopies(SearchPattern pattern, SearchDocument[] indexMatches, ICompilationUnit[] copies, SearchParticipant participant)
    • setFocus

      public static void setFocus(SearchPattern pattern, IJavaElement focus)
    • setIndexQualifierQuery

      public static void setIndexQualifierQuery(SearchPattern pattern, char[] queries)
      Sets the qualifier queries into pattern.
      Siehe auch:
    • classFileReader

      public static IBinaryType classFileReader(IType type)
    • 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

      public static IJavaElement getProjectOrJar(IJavaElement element)
    • projectOrJarFocus

      public static IJavaElement projectOrJarFocus(SearchPattern pattern)
    • accept

      public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction)
      Add an additional binary type
      Angegeben von:
      accept in Schnittstelle ITypeRequestor
    • accept

      public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction)
      Add an additional compilation unit into the loop -> build compilation unit declarations, their bindings and record their results.
      Angegeben von:
      accept in Schnittstelle ITypeRequestor
    • accept

      public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction)
      Add additional source types
      Angegeben von:
      accept in Schnittstelle ITypeRequestor
    • basicParser

      protected Parser basicParser()
    • cacheBinaryType

      protected BinaryTypeBinding cacheBinaryType(IType type, IBinaryType binaryType) throws JavaModelException
      Löst aus:
      JavaModelException
    • computeSuperTypeNames

      protected char[][][] computeSuperTypeNames(IType focusType)
    • createHandle

      protected IJavaElement createHandle(LambdaExpression lambdaExpression, IJavaElement parent)
      Creates an IMethod from the given lambda declaration and type.
    • createHandle

      protected IJavaElement createHandle(AbstractMethodDeclaration method, IJavaElement parent)
      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

      protected IJavaElement createHandle(Annotation annotation, IAnnotatable parent)
      Create an handle for a local variable declaration (may be a local variable or type parameter).
    • createHierarchyResolver

      protected boolean createHierarchyResolver(IType focusType, PossibleMatch[] possibleMatches)
    • createImportHandle

      protected IJavaElement createImportHandle(ImportReference importRef)
      Creates an IImportDeclaration from the given import statement
    • createPackageDeclarationHandle

      protected IJavaElement createPackageDeclarationHandle(CompilationUnitDeclaration unit)
      Creates an IImportDeclaration from the given import statement
    • createTypeHandle

      protected IType createTypeHandle(String simpleTypeName)
      Creates an IType from the given simple top level type name.
    • encloses

      protected boolean encloses(IJavaElement element)
    • 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

      protected IType getFocusType()
    • getMethodBodies

      protected void getMethodBodies(CompilationUnitDeclaration unit, MatchingNodeSet nodeSet)
    • getType

      protected TypeBinding getType(Object typeKey, char[] typeName)
    • getMethodBinding

      public MethodBinding getMethodBinding(MethodPattern methodPattern)
    • hasAlreadyDefinedType

      protected boolean hasAlreadyDefinedType(CompilationUnitDeclaration parsedUnit)
    • initialize

      public void initialize(JavaProject project, int possibleMatchSize) throws JavaModelException
      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

      protected IType lookupType(ReferenceBinding typeBinding)
    • 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

      protected void purgeMethodStatements(TypeDeclaration type, boolean checkEachMethod)
    • reduceParseTree

      protected void reduceParseTree(CompilationUnitDeclaration unit)
      Called prior to the unit being resolved. Reduce the parse tree where possible.
    • getParticipant

      public SearchParticipant getParticipant()
    • report

      protected void report(SearchMatch match) throws org.eclipse.core.runtime.CoreException
      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

      protected boolean typeInHierarchy(ReferenceBinding binding)