com.android.tools.lint.detector.api
Class Location.SearchHints

java.lang.Object
  extended by com.android.tools.lint.detector.api.Location.SearchHints
Enclosing class:
Location

public static class Location.SearchHints
extends java.lang.Object

Extra information pertaining to finding a symbol in a source buffer, used by Location.create(File, String, int, String, String, SearchHints)


Method Summary
static Location.SearchHints create(Location.SearchDirection direction)
          Constructs a new Location.SearchHints object
 boolean isConstructor()
           
 boolean isJavaSymbol()
           
 boolean isWholeWord()
           
 Location.SearchHints matchConstructor()
          Indicates that pattern matches should apply to constructors.
 Location.SearchHints matchJavaSymbol()
          Indicates that pattern matches should apply to Java symbols only
 Location.SearchHints matchWholeWord()
          Indicates that pattern matches should apply to whole words only
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

@NonNull
public static Location.SearchHints create(@NonNull
                                                  Location.SearchDirection direction)
Constructs a new Location.SearchHints object

Parameters:
direction - the direction to search in for the pattern
Returns:
a new @link SearchHints} object

matchWholeWord

@NonNull
public Location.SearchHints matchWholeWord()
Indicates that pattern matches should apply to whole words only

Returns:
this, for constructor chaining

isWholeWord

public boolean isWholeWord()
Returns:
true if the pattern match should be for whole words only

matchJavaSymbol

@NonNull
public Location.SearchHints matchJavaSymbol()
Indicates that pattern matches should apply to Java symbols only

Returns:
this, for constructor chaining

isJavaSymbol

public boolean isJavaSymbol()
Returns:
true if the pattern match should be for Java symbols only

matchConstructor

@NonNull
public Location.SearchHints matchConstructor()
Indicates that pattern matches should apply to constructors. If so, look for some other possible source aliases too, such as "super".

Returns:
this, for constructor chaining

isConstructor

public boolean isConstructor()
Returns:
true if the pattern match should be for a constructor