| java.lang.Object org.eclipse.jdt.core.search.SearchMatch
All known Subclasses: org.eclipse.jdt.core.search.TypeParameterReferenceMatch, org.eclipse.jdt.core.search.MethodReferenceMatch, org.eclipse.jdt.core.search.LocalVariableReferenceMatch, org.eclipse.jdt.core.search.TypeParameterDeclarationMatch, org.eclipse.jdt.core.search.PackageReferenceMatch, org.eclipse.jdt.core.search.TypeReferenceMatch, org.eclipse.jdt.core.search.MethodDeclarationMatch, org.eclipse.jdt.core.search.TypeDeclarationMatch, org.eclipse.jdt.core.search.LocalVariableDeclarationMatch, org.eclipse.jdt.core.search.FieldReferenceMatch, org.eclipse.jdt.core.search.PackageDeclarationMatch, org.eclipse.jdt.core.search.FieldDeclarationMatch,
Field Summary | |
final public static int | A_ACCURATE The search result corresponds an exact match of the search pattern. | final public static int | A_INACCURATE The search result is potentially a match for the search pattern,
but the search engine is unable to fully check it (for example, because
there are errors in the code or the classpath are not correctly set). |
Method Summary | |
final public int | getAccuracy() Returns the accuracy of this search match. | final public Object | getElement() Returns the element of this search match. | final public int | getLength() Returns the length of this search match. | final public int | getOffset() Returns the offset of this search match. | final public SearchParticipant | getParticipant() Returns the search participant which issued this search match. | final public IResource | getResource() Returns the resource containing this search match. | final public int | getRule() Returns the rule used while creating the match. | final public boolean | isEquivalent() Returns whether match element is compatible with searched pattern or not. | final public boolean | isErasure() Returns whether match element only has same erasure than searched pattern or not. | final public boolean | isExact() Returns whether element matches exactly searched pattern or not. | final public boolean | isImplicit() Returns whether the associated element is implicit or not. | final public boolean | isInsideDocComment() Returns whether this search match is inside a doc comment of a Java
source file. | final public boolean | isRaw() Returns whether the associated element is a raw type/method or not. | final public void | setAccuracy(int accuracy) Sets the accuracy of this match. | final public void | setElement(Object element) Sets the element of this search match. | final public void | setImplicit(boolean implicit) Sets whether the associated element is implicit or not. | final public void | setInsideDocComment(boolean insideDoc) Sets whether this search match is inside a doc comment of a Java
source file. | final public void | setLength(int length) Sets the length of this search match. | final public void | setOffset(int offset) Sets the offset of this search match. | final public void | setParticipant(SearchParticipant participant) Sets the participant of this match. | final public void | setRaw(boolean raw) Set whether the associated element is a raw type/method or not. | final public void | setResource(IResource resource) Sets the resource of this match. | final public void | setRule(int rule) Set the rule used while reporting the match. | public String | toString() |
A_INACCURATE | final public static int A_INACCURATE(Code) | | The search result is potentially a match for the search pattern,
but the search engine is unable to fully check it (for example, because
there are errors in the code or the classpath are not correctly set).
See Also: SearchMatch.getAccuracy() |
SearchMatch | public SearchMatch(IJavaElement element, int accuracy, int offset, int length, SearchParticipant participant, IResource resource)(Code) | | Creates a new search match.
Note that isInsideDocComment() defaults to false.
Parameters: element - the element that encloses or corresponds to the match,or null if none Parameters: accuracy - one of SearchMatch.A_ACCURATE or SearchMatch.A_INACCURATE Parameters: offset - the offset the match starts at, or -1 if unknown Parameters: length - the length of the match, or -1 if unknown Parameters: participant - the search participant that created the match Parameters: resource - the resource of the element, or null if none |
getElement | final public Object getElement()(Code) | | Returns the element of this search match.
In case of a reference match, this is the inner-most enclosing element of the reference.
In case of a declaration match, this is the declaration.
the element of the search match, or null if none |
getLength | final public int getLength()(Code) | | Returns the length of this search match.
the length of this search match, or -1 if unknown |
getOffset | final public int getOffset()(Code) | | Returns the offset of this search match.
the offset of this search match, or -1 if unknown |
getParticipant | final public SearchParticipant getParticipant()(Code) | | Returns the search participant which issued this search match.
the participant which issued this search match |
getResource | final public IResource getResource()(Code) | | Returns the resource containing this search match.
the resource of the match, or null if none |
isEquivalent | final public boolean isEquivalent()(Code) | | Returns whether match element is compatible with searched pattern or not.
Note that equivalent matches are also erasure ones.
true if match element is compatible false otherwise since: 3.1 |
isErasure | final public boolean isErasure()(Code) | | Returns whether match element only has same erasure than searched pattern or not.
Note that this is always true for both generic and non-generic element as soon
as the accuracy is accurate.
true if match element has same erasurefalse otherwise since: 3.1 |
isExact | final public boolean isExact()(Code) | | Returns whether element matches exactly searched pattern or not.
Note that exact matches are also erasure and equivalent ones.
true if match is exactfalse otherwise since: 3.1 |
isImplicit | final public boolean isImplicit()(Code) | | Returns whether the associated element is implicit or not.
Note that this piece of information is currently only implemented
for implicit member pair value in annotation.
true if this match is associated to an implicitelement and false otherwise since: 3.1 |
isInsideDocComment | final public boolean isInsideDocComment()(Code) | | Returns whether this search match is inside a doc comment of a Java
source file.
true if this search match is inside a doccomment, and false otherwise |
isRaw | final public boolean isRaw()(Code) | | Returns whether the associated element is a raw type/method or not.
true if this match is associated to a rawtype or method and false otherwise since: 3.1 |
setElement | final public void setElement(Object element)(Code) | | Sets the element of this search match.
Parameters: element - the element that encloses or corresponds to the match,or null if none |
setImplicit | final public void setImplicit(boolean implicit)(Code) | | Sets whether the associated element is implicit or not.
Typically, this is the case when match is on an implicit constructor
or an implicit member pair value in annotation.
Parameters: implicit - true if this match is associated to an implicitelement and false otherwise since: 3.1 |
setInsideDocComment | final public void setInsideDocComment(boolean insideDoc)(Code) | | Sets whether this search match is inside a doc comment of a Java
source file.
Parameters: insideDoc - true if this search match is inside a doccomment, and false otherwise |
setLength | final public void setLength(int length)(Code) | | Sets the length of this search match.
Parameters: length - the length of the match, or -1 if unknown |
setOffset | final public void setOffset(int offset)(Code) | | Sets the offset of this search match.
Parameters: offset - the offset the match starts at, or -1 if unknown |
setParticipant | final public void setParticipant(SearchParticipant participant)(Code) | | Sets the participant of this match.
Parameters: participant - the search participant that created this match |
setRaw | final public void setRaw(boolean raw)(Code) | | Set whether the associated element is a raw type/method or not.
Parameters: raw - true if this search match is associated to a rawtype or method and false otherwise since: 3.1 |
setResource | final public void setResource(IResource resource)(Code) | | Sets the resource of this match.
Parameters: resource - the resource of the match, or null if none |
|
|