java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.matching.PatternLocator
Alle implementierten Schnittstellen:
IQualifiedTypeResolutionListener, IIndexConstants
Bekannte direkte Unterklassen:
AndLocator, ConstructorLocator, MethodLocator, ModuleLocator, OrLocator, PackageDeclarationLocator, PackageReferenceLocator, SuperTypeReferenceLocator, TypeDeclarationLocator, TypeParameterLocator, TypeReferenceLocator, VariableLocator

public abstract class PatternLocator extends Object implements IIndexConstants, IQualifiedTypeResolutionListener
  • Felddetails

    • matchMode

      protected int matchMode
    • isCaseSensitive

      protected boolean isCaseSensitive
    • isEquivalentMatch

      protected boolean isEquivalentMatch
    • isErasureMatch

      protected boolean isErasureMatch
    • mustResolve

      protected boolean mustResolve
    • mayBeGeneric

      protected boolean mayBeGeneric
    • IMPOSSIBLE_MATCH

      public static final int IMPOSSIBLE_MATCH
      Siehe auch:
    • INACCURATE_MATCH

      public static final int INACCURATE_MATCH
      Siehe auch:
    • POSSIBLE_MATCH

      public static final int POSSIBLE_MATCH
      Siehe auch:
    • ACCURATE_MATCH

      public static final int ACCURATE_MATCH
      Siehe auch:
    • ERASURE_MATCH

      public static final int ERASURE_MATCH
      Siehe auch:
    • NO_FLAVOR

      public static final int NO_FLAVOR
      Siehe auch:
    • EXACT_FLAVOR

      public static final int EXACT_FLAVOR
      Siehe auch:
    • PREFIX_FLAVOR

      public static final int PREFIX_FLAVOR
      Siehe auch:
    • PATTERN_FLAVOR

      public static final int PATTERN_FLAVOR
      Siehe auch:
    • REGEXP_FLAVOR

      public static final int REGEXP_FLAVOR
      Siehe auch:
    • CAMELCASE_FLAVOR

      public static final int CAMELCASE_FLAVOR
      Siehe auch:
    • SUPER_INVOCATION_FLAVOR

      public static final int SUPER_INVOCATION_FLAVOR
      Siehe auch:
    • SUB_INVOCATION_FLAVOR

      public static final int SUB_INVOCATION_FLAVOR
      Siehe auch:
    • OVERRIDDEN_METHOD_FLAVOR

      public static final int OVERRIDDEN_METHOD_FLAVOR
      Siehe auch:
    • SUPERTYPE_REF_FLAVOR

      public static final int SUPERTYPE_REF_FLAVOR
      Siehe auch:
    • MATCH_LEVEL_MASK

      public static final int MATCH_LEVEL_MASK
      Siehe auch:
    • FLAVORS_MASK

      public static final int FLAVORS_MASK
      Siehe auch:
    • COMPILATION_UNIT_CONTAINER

      public static final int COMPILATION_UNIT_CONTAINER
      Siehe auch:
    • CLASS_CONTAINER

      public static final int CLASS_CONTAINER
      Siehe auch:
    • METHOD_CONTAINER

      public static final int METHOD_CONTAINER
      Siehe auch:
    • FIELD_CONTAINER

      public static final int FIELD_CONTAINER
      Siehe auch:
    • ALL_CONTAINER

      public static final int ALL_CONTAINER
      Siehe auch:
    • RAW_MASK

      public static final int RAW_MASK
      Siehe auch:
    • RULE_MASK

      public static final int RULE_MASK
      Siehe auch:
  • Konstruktordetails

  • Methodendetails

    • patternLocator

      public static PatternLocator patternLocator(SearchPattern pattern)
    • qualifiedPattern

      public static char[] qualifiedPattern(char[] simpleNamePattern, char[] qualificationPattern)
    • qualifiedSourceName

      public static char[] qualifiedSourceName(TypeBinding binding)
    • clear

      protected void clear()
    • getQualifiedPattern

      protected char[] getQualifiedPattern(char[] simpleNamePattern, char[] qualificationPattern)
    • getQualifiedSourceName

      protected char[] getQualifiedSourceName(TypeBinding binding)
    • getTypeNameBinding

      protected TypeBinding getTypeNameBinding(int index)
    • initializePolymorphicSearch

      public void initializePolymorphicSearch(MatchLocator locator)
      Initializes this search pattern so that polymorphic search can be performed.
    • match

      public int match(Annotation node, MatchingNodeSet nodeSet)
    • match

      public int match(ASTNode node, MatchingNodeSet nodeSet)
      Check if the given ast node syntactically matches this pattern. If it does, add it to the match set. Returns the match level.
    • match

      public int match(ConstructorDeclaration node, MatchingNodeSet nodeSet)
    • match

      public int match(Expression node, MatchingNodeSet nodeSet)
    • match

      public int match(FieldDeclaration node, MatchingNodeSet nodeSet)
    • match

      public int match(LambdaExpression node, MatchingNodeSet nodeSet)
    • match

      public int match(LocalDeclaration node, MatchingNodeSet nodeSet)
    • match

      public int match(MethodDeclaration node, MatchingNodeSet nodeSet)
    • match

      public int match(MemberValuePair node, MatchingNodeSet nodeSet)
    • match

      public int match(MessageSend node, MatchingNodeSet nodeSet)
    • match

      protected int match(ModuleDeclaration node, MatchingNodeSet nodeSet)
    • match

      protected int match(ModuleReference node, MatchingNodeSet nodeSet)
    • match

      public int match(Reference node, MatchingNodeSet nodeSet)
    • match

      public int match(ReferenceExpression node, MatchingNodeSet nodeSet)
    • match

      public int match(TypeDeclaration node, MatchingNodeSet nodeSet)
    • match

      public int match(TypeParameter node, MatchingNodeSet nodeSet)
    • match

      public int match(TypeReference node, MatchingNodeSet nodeSet)
    • matchContainer

      protected int matchContainer()
      Returns the type(s) of container for this pattern. It is a bit combination of types, denoting compilation unit, class declarations, field declarations or method declarations.
    • fineGrain

      protected int fineGrain()
    • matchesName

      protected boolean matchesName(char[] pattern, char[] name)
      Returns whether the given name matches the given pattern.
    • matchNameValue

      protected int matchNameValue(char[] pattern, char[] name)
      Return how the given name matches the given pattern.
      Parameter:
      pattern -
      name -
      Gibt zurück:
      Possible values are:
      Siehe auch:
      • "https://bugs.eclipse.org/bugs/show_bug.cgi?id=79866"
    • matchesTypeReference

      protected boolean matchesTypeReference(char[] pattern, TypeReference type)
      Returns whether the given type reference matches the given pattern.
    • matchLevel

      protected int matchLevel(ImportReference importRef)
      Returns the match level for the given importRef.
    • matchLevelAndReportImportRef

      protected void matchLevelAndReportImportRef(ImportReference importRef, Binding binding, MatchLocator locator) throws org.eclipse.core.runtime.CoreException
      Reports the match of the given import reference if the resolveLevel is high enough.
      Löst aus:
      org.eclipse.core.runtime.CoreException
    • matchReportImportRef

      protected void matchReportImportRef(ImportReference importRef, Binding binding, IJavaElement element, int accuracy, MatchLocator locator) throws org.eclipse.core.runtime.CoreException
      Reports the match of the given import reference.
      Löst aus:
      org.eclipse.core.runtime.CoreException
    • matchReportReference

      protected void matchReportReference(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, MatchLocator locator) throws org.eclipse.core.runtime.CoreException
      Reports the match of the given reference.
      Löst aus:
      org.eclipse.core.runtime.CoreException
    • matchReportReference

      protected void matchReportReference(ASTNode reference, IJavaElement element, IJavaElement localElement, IJavaElement[] otherElements, Binding elementBinding, int accuracy, MatchLocator locator) throws org.eclipse.core.runtime.CoreException
      Reports the match of the given reference. Also provide a local element to eventually report in match.
      Löst aus:
      org.eclipse.core.runtime.CoreException
    • newDeclarationMatch

      public SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator)
    • referenceType

      protected int referenceType()
    • resolveLevel

      public int resolveLevel(ASTNode possibleMatchingNode)
      Finds out whether the given ast node matches this search pattern. Returns IMPOSSIBLE_MATCH if it doesn't. Returns INACCURATE_MATCH if it potentially matches this search pattern (i.e. it has already been resolved but resolving failed.) Returns ACCURATE_MATCH if it matches exactly this search pattern (i.e. it doesn't need to be resolved or it has already been resolved.)
    • updateMatch

      protected void updateMatch(ParameterizedTypeBinding parameterizedBinding, char[][][] patternTypeArguments, MatchLocator locator)
    • updateMatch

      protected void updateMatch(ParameterizedTypeBinding parameterizedBinding, char[][][] patternTypeArguments, boolean patternHasTypeParameters, int depth, MatchLocator locator)
    • updateMatch

      protected void updateMatch(TypeBinding[] argumentsBinding, MatchLocator locator, char[][] patternArguments, boolean hasTypeParameters)
    • resolveLevel

      public int resolveLevel(Binding binding)
      Finds out whether the given binding matches this search pattern. Returns ACCURATE_MATCH if it does. Returns INACCURATE_MATCH if resolve failed but match is still possible. Returns IMPOSSIBLE_MATCH otherwise. Default is to return INACCURATE_MATCH.
    • resolveLevelForType

      protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, TypeBinding binding)
      Returns whether the given type binding matches the given simple name pattern and qualification pattern. Note that from since 3.1, this method resolve to accurate member or local types even if they are not fully qualified (i.e. X.Member instead of p.X.Member). Returns ACCURATE_MATCH if it does. Returns INACCURATE_MATCH if resolve failed. Returns IMPOSSIBLE_MATCH if it doesn't.
    • resolveLevelForType

      protected int resolveLevelForType(char[] qualifiedPattern, TypeBinding type)
      Returns whether the given type binding matches the given qualified pattern. Returns ACCURATE_MATCH if it does. Returns INACCURATE_MATCH if resolve failed. Returns IMPOSSIBLE_MATCH if it doesn't.
    • resolveLevelForType

      protected int resolveLevelForType(char[] simpleNamePattern, char[] qualificationPattern, char[][][] patternTypeArguments, int depth, TypeBinding type)
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • recordResolution

      public void recordResolution(QualifiedTypeReference typeReference, TypeBinding resolution)
      Beschreibung aus Schnittstelle kopiert: IQualifiedTypeResolutionListener
      Notifies that the given resolution has been found for the given type reference. Some of the bindings are intermediate types i.e. qualifying types.
      Angegeben von:
      recordResolution in Schnittstelle IQualifiedTypeResolutionListener
      Parameter:
      typeReference - the type reference
      resolution - the resolution found