|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.core.search.matching.PatternLocator
public abstract class PatternLocator
| Field Summary | |
|---|---|
static int |
ACCURATE_MATCH
|
static int |
ALL_CONTAINER
|
static int |
CAMELCASE_FLAVOR
|
static int |
CLASS_CONTAINER
|
static int |
COMPILATION_UNIT_CONTAINER
|
static int |
ERASURE_MATCH
|
static int |
EXACT_FLAVOR
|
static int |
FIELD_CONTAINER
|
static int |
FLAVORS_MASK
|
static int |
IMPOSSIBLE_MATCH
|
static int |
INACCURATE_MATCH
|
protected boolean |
isCaseSensitive
|
protected boolean |
isEquivalentMatch
|
protected boolean |
isErasureMatch
|
static int |
MATCH_LEVEL_MASK
|
protected int |
matchMode
|
protected boolean |
mayBeGeneric
|
static int |
METHOD_CONTAINER
|
protected boolean |
mustResolve
|
static int |
NO_FLAVOR
|
static int |
OVERRIDDEN_METHOD_FLAVOR
|
static int |
PATTERN_FLAVOR
|
static int |
POSSIBLE_MATCH
|
static int |
PREFIX_FLAVOR
|
static int |
RAW_MASK
|
static int |
REGEXP_FLAVOR
|
static int |
RULE_MASK
|
static int |
SUB_INVOCATION_FLAVOR
|
static int |
SUPER_INVOCATION_FLAVOR
|
static int |
SUPERTYPE_REF_FLAVOR
|
| Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.core.search.indexing.IIndexConstants |
|---|
AND_PATTERN, ANNOT_REF_PATTERN, ANNOTATION_REF, ANNOTATION_TYPE_SUFFIX, CLASS_AND_ENUM_SUFFIX, CLASS_AND_INTERFACE_SUFFIX, CLASS_SUFFIX, CONSTRUCTOR_DECL, CONSTRUCTOR_PATTERN, CONSTRUCTOR_REF, COUNTS, DEFAULT_CONSTRUCTOR, ENUM_SUFFIX, FIELD_DECL, FIELD_PATTERN, INTERFACE_AND_ANNOTATION_SUFFIX, INTERFACE_SUFFIX, LOCAL_VAR_PATTERN, METHOD_DECL, METHOD_PATTERN, METHOD_REF, OBJECT, ONE_STAR, ONE_STAR_CHAR, ONE_ZERO, ONE_ZERO_CHAR, OR_PATTERN, PARAMETER_SEPARATOR, PKG_DECL_PATTERN, PKG_REF_PATTERN, REF, SECONDARY_SUFFIX, SEPARATOR, SUPER_REF, SUPER_REF_PATTERN, TYPE_DECL, TYPE_DECL_PATTERN, TYPE_PARAM_PATTERN, TYPE_REF_PATTERN, TYPE_SUFFIX, ZERO_CHAR |
| Constructor Summary | |
|---|---|
PatternLocator(SearchPattern pattern)
|
|
| Method Summary | |
|---|---|
protected void |
clear()
|
protected int |
fineGrain()
|
protected char[] |
getQualifiedPattern(char[] simpleNamePattern,
char[] qualificationPattern)
|
protected char[] |
getQualifiedSourceName(TypeBinding binding)
|
protected TypeBinding |
getTypeNameBinding(int index)
|
void |
initializePolymorphicSearch(MatchLocator locator)
Initializes this search pattern so that polymorphic search can be performed. |
int |
match(Annotation node,
MatchingNodeSet nodeSet)
|
int |
match(ASTNode node,
MatchingNodeSet nodeSet)
Check if the given ast node syntactically matches this pattern. |
int |
match(ConstructorDeclaration node,
MatchingNodeSet nodeSet)
|
int |
match(Expression node,
MatchingNodeSet nodeSet)
|
int |
match(FieldDeclaration node,
MatchingNodeSet nodeSet)
|
int |
match(LocalDeclaration node,
MatchingNodeSet nodeSet)
|
int |
match(MemberValuePair node,
MatchingNodeSet nodeSet)
|
int |
match(MessageSend node,
MatchingNodeSet nodeSet)
|
int |
match(MethodDeclaration node,
MatchingNodeSet nodeSet)
|
int |
match(Reference node,
MatchingNodeSet nodeSet)
|
int |
match(TypeDeclaration node,
MatchingNodeSet nodeSet)
|
int |
match(TypeParameter node,
MatchingNodeSet nodeSet)
|
int |
match(TypeReference node,
MatchingNodeSet nodeSet)
|
protected int |
matchContainer()
Returns the type(s) of container for this pattern. |
protected boolean |
matchesName(char[] pattern,
char[] name)
Returns whether the given name matches the given pattern. |
protected boolean |
matchesTypeReference(char[] pattern,
TypeReference type)
Returns whether the given type reference matches the given pattern. |
protected int |
matchLevel(ImportReference importRef)
Returns the match level for the given importRef. |
protected void |
matchLevelAndReportImportRef(ImportReference importRef,
Binding binding,
MatchLocator locator)
Reports the match of the given import reference if the resolveLevel is high enough. |
protected int |
matchNameValue(char[] pattern,
char[] name)
Return how the given name matches the given pattern. |
protected void |
matchReportImportRef(ImportReference importRef,
Binding binding,
IJavaElement element,
int accuracy,
MatchLocator locator)
Reports the match of the given import reference. |
protected void |
matchReportReference(ASTNode reference,
IJavaElement element,
Binding elementBinding,
int accuracy,
MatchLocator locator)
Reports the match of the given reference. |
protected void |
matchReportReference(ASTNode reference,
IJavaElement element,
IJavaElement localElement,
IJavaElement[] otherElements,
Binding elementBinding,
int accuracy,
MatchLocator locator)
Reports the match of the given reference. |
SearchMatch |
newDeclarationMatch(ASTNode reference,
IJavaElement element,
Binding elementBinding,
int accuracy,
int length,
MatchLocator locator)
|
static PatternLocator |
patternLocator(SearchPattern pattern)
|
static char[] |
qualifiedPattern(char[] simpleNamePattern,
char[] qualificationPattern)
|
static char[] |
qualifiedSourceName(TypeBinding binding)
|
protected int |
referenceType()
|
int |
resolveLevel(ASTNode possibleMatchingNode)
Finds out whether the given ast node matches this search pattern. |
int |
resolveLevel(Binding binding)
Finds out whether the given binding matches this search pattern. |
protected int |
resolveLevelForType(char[] simpleNamePattern,
char[] qualificationPattern,
char[][][] patternTypeArguments,
int depth,
TypeBinding type)
|
protected int |
resolveLevelForType(char[] simpleNamePattern,
char[] qualificationPattern,
TypeBinding binding)
Returns whether the given type binding matches the given simple name pattern and qualification pattern. |
protected int |
resolveLevelForType(char[] qualifiedPattern,
TypeBinding type)
Returns whether the given type binding matches the given qualified pattern. |
java.lang.String |
toString()
|
protected void |
updateMatch(ParameterizedTypeBinding parameterizedBinding,
char[][][] patternTypeArguments,
boolean patternHasTypeParameters,
int depth,
MatchLocator locator)
|
protected void |
updateMatch(ParameterizedTypeBinding parameterizedBinding,
char[][][] patternTypeArguments,
MatchLocator locator)
|
protected void |
updateMatch(TypeBinding[] argumentsBinding,
MatchLocator locator,
char[][] patternArguments,
boolean hasTypeParameters)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int matchMode
protected boolean isCaseSensitive
protected boolean isEquivalentMatch
protected boolean isErasureMatch
protected boolean mustResolve
protected boolean mayBeGeneric
public static final int IMPOSSIBLE_MATCH
public static final int INACCURATE_MATCH
public static final int POSSIBLE_MATCH
public static final int ACCURATE_MATCH
public static final int ERASURE_MATCH
public static final int NO_FLAVOR
public static final int EXACT_FLAVOR
public static final int PREFIX_FLAVOR
public static final int PATTERN_FLAVOR
public static final int REGEXP_FLAVOR
public static final int CAMELCASE_FLAVOR
public static final int SUPER_INVOCATION_FLAVOR
public static final int SUB_INVOCATION_FLAVOR
public static final int OVERRIDDEN_METHOD_FLAVOR
public static final int SUPERTYPE_REF_FLAVOR
public static final int MATCH_LEVEL_MASK
public static final int FLAVORS_MASK
public static final int COMPILATION_UNIT_CONTAINER
public static final int CLASS_CONTAINER
public static final int METHOD_CONTAINER
public static final int FIELD_CONTAINER
public static final int ALL_CONTAINER
public static final int RAW_MASK
public static final int RULE_MASK
| Constructor Detail |
|---|
public PatternLocator(SearchPattern pattern)
| Method Detail |
|---|
public static PatternLocator patternLocator(SearchPattern pattern)
public static char[] qualifiedPattern(char[] simpleNamePattern,
char[] qualificationPattern)
public static char[] qualifiedSourceName(TypeBinding binding)
protected void clear()
protected char[] getQualifiedPattern(char[] simpleNamePattern,
char[] qualificationPattern)
protected char[] getQualifiedSourceName(TypeBinding binding)
protected TypeBinding getTypeNameBinding(int index)
public void initializePolymorphicSearch(MatchLocator locator)
public int match(Annotation node,
MatchingNodeSet nodeSet)
public int match(ASTNode node,
MatchingNodeSet nodeSet)
public int match(ConstructorDeclaration node,
MatchingNodeSet nodeSet)
public int match(Expression node,
MatchingNodeSet nodeSet)
public int match(FieldDeclaration node,
MatchingNodeSet nodeSet)
public int match(LocalDeclaration node,
MatchingNodeSet nodeSet)
public int match(MethodDeclaration node,
MatchingNodeSet nodeSet)
public int match(MemberValuePair node,
MatchingNodeSet nodeSet)
public int match(MessageSend node,
MatchingNodeSet nodeSet)
public int match(Reference node,
MatchingNodeSet nodeSet)
public int match(TypeDeclaration node,
MatchingNodeSet nodeSet)
public int match(TypeParameter node,
MatchingNodeSet nodeSet)
public int match(TypeReference node,
MatchingNodeSet nodeSet)
protected int matchContainer()
protected int fineGrain()
protected boolean matchesName(char[] pattern,
char[] name)
protected int matchNameValue(char[] pattern,
char[] name)
pattern - name -
ACCURATE_MATCHIMPOSSIBLE_MATCHPOSSIBLE_MATCH which may be flavored with following values:
EXACT_FLAVOR: Given name is equals to patternPREFIX_FLAVOR: Given name prefix equals to patternCAMELCASE_FLAVOR: Given name matches pattern as Camel CasePATTERN_FLAVOR: Given name matches pattern as Pattern (i.e. using '*' and '?' characters)
protected boolean matchesTypeReference(char[] pattern,
TypeReference type)
protected int matchLevel(ImportReference importRef)
protected void matchLevelAndReportImportRef(ImportReference importRef,
Binding binding,
MatchLocator locator)
throws CoreException
CoreException
protected void matchReportImportRef(ImportReference importRef,
Binding binding,
IJavaElement element,
int accuracy,
MatchLocator locator)
throws CoreException
CoreException
protected void matchReportReference(ASTNode reference,
IJavaElement element,
Binding elementBinding,
int accuracy,
MatchLocator locator)
throws CoreException
CoreException
protected void matchReportReference(ASTNode reference,
IJavaElement element,
IJavaElement localElement,
IJavaElement[] otherElements,
Binding elementBinding,
int accuracy,
MatchLocator locator)
throws CoreException
CoreException
public SearchMatch newDeclarationMatch(ASTNode reference,
IJavaElement element,
Binding elementBinding,
int accuracy,
int length,
MatchLocator locator)
protected int referenceType()
public int resolveLevel(ASTNode possibleMatchingNode)
protected void updateMatch(ParameterizedTypeBinding parameterizedBinding,
char[][][] patternTypeArguments,
MatchLocator locator)
protected void updateMatch(ParameterizedTypeBinding parameterizedBinding,
char[][][] patternTypeArguments,
boolean patternHasTypeParameters,
int depth,
MatchLocator locator)
protected void updateMatch(TypeBinding[] argumentsBinding,
MatchLocator locator,
char[][] patternArguments,
boolean hasTypeParameters)
public int resolveLevel(Binding binding)
protected int resolveLevelForType(char[] simpleNamePattern,
char[] qualificationPattern,
TypeBinding binding)
protected int resolveLevelForType(char[] qualifiedPattern,
TypeBinding type)
protected int resolveLevelForType(char[] simpleNamePattern,
char[] qualificationPattern,
char[][][] patternTypeArguments,
int depth,
TypeBinding type)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||