public class OrLocator extends PatternLocator
| Modifier and Type | Field and Description |
|---|---|
protected PatternLocator[] |
patternLocators |
ACCURATE_MATCH, ALL_CONTAINER, CAMELCASE_FLAVOR, CLASS_CONTAINER, COMPILATION_UNIT_CONTAINER, ERASURE_MATCH, EXACT_FLAVOR, FIELD_CONTAINER, FLAVORS_MASK, IMPOSSIBLE_MATCH, INACCURATE_MATCH, isCaseSensitive, isEquivalentMatch, isErasureMatch, MATCH_LEVEL_MASK, matchMode, mayBeGeneric, METHOD_CONTAINER, mustResolve, NO_FLAVOR, OVERRIDDEN_METHOD_FLAVOR, PATTERN_FLAVOR, POSSIBLE_MATCH, PREFIX_FLAVOR, RAW_MASK, REGEXP_FLAVOR, RULE_MASK, SUB_INVOCATION_FLAVOR, SUPER_INVOCATION_FLAVOR, SUPERTYPE_REF_FLAVORAND_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_DECL_PLUS, 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| Modifier and Type | Method and Description |
|---|---|
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(LambdaExpression 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(ReferenceExpression 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 void |
matchLevelAndReportImportRef(ImportReference importRef,
Binding binding,
MatchLocator locator)
Reports the match of the given import reference if the resolveLevel is high enough.
|
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) |
void |
recordResolution(QualifiedTypeReference typeReference,
TypeBinding resolution)
Notifies that the given resolution has been found for the given type reference.
|
int |
resolveLevel(ASTNode node)
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.
|
clear, fineGrain, getQualifiedPattern, getQualifiedSourceName, getTypeNameBinding, matchesName, matchesTypeReference, matchLevel, matchNameValue, patternLocator, qualifiedPattern, qualifiedSourceName, referenceType, resolveLevelForType, resolveLevelForType, resolveLevelForType, toString, updateMatch, updateMatch, updateMatchprotected PatternLocator[] patternLocators
public OrLocator(OrPattern pattern)
public void initializePolymorphicSearch(MatchLocator locator)
PatternLocatorinitializePolymorphicSearch in class PatternLocatorpublic int match(Annotation node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(ASTNode node, MatchingNodeSet nodeSet)
PatternLocatormatch in class PatternLocatorpublic int match(ConstructorDeclaration node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(Expression node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(FieldDeclaration node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(LambdaExpression node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(LocalDeclaration node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(MethodDeclaration node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(MemberValuePair node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(MessageSend node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(Reference node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(ReferenceExpression node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(TypeDeclaration node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(TypeParameter node, MatchingNodeSet nodeSet)
match in class PatternLocatorpublic int match(TypeReference node, MatchingNodeSet nodeSet)
match in class PatternLocatorprotected int matchContainer()
PatternLocatormatchContainer in class PatternLocatorprotected void matchLevelAndReportImportRef(ImportReference importRef, Binding binding, MatchLocator locator) throws CoreException
PatternLocatormatchLevelAndReportImportRef in class PatternLocatorCoreExceptionprotected void matchReportImportRef(ImportReference importRef, Binding binding, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException
PatternLocatormatchReportImportRef in class PatternLocatorCoreExceptionprotected void matchReportReference(ASTNode reference, IJavaElement element, IJavaElement localElement, IJavaElement[] otherElements, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException
PatternLocatormatchReportReference in class PatternLocatorCoreExceptionprotected void matchReportReference(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException
PatternLocatormatchReportReference in class PatternLocatorCoreExceptionpublic SearchMatch newDeclarationMatch(ASTNode reference, IJavaElement element, Binding elementBinding, int accuracy, int length, MatchLocator locator)
newDeclarationMatch in class PatternLocatorpublic int resolveLevel(ASTNode node)
PatternLocatorresolveLevel in class PatternLocatorpublic int resolveLevel(Binding binding)
PatternLocatorresolveLevel in class PatternLocatorpublic void recordResolution(QualifiedTypeReference typeReference, TypeBinding resolution)
IQualifiedTypeResolutionListenerrecordResolution in interface IQualifiedTypeResolutionListenerrecordResolution in class PatternLocatortypeReference - the type referenceresolution - the resolution found