com.android.tools.lint.detector.api
Interface Location.Handle

All Known Implementing Classes:
Location.DefaultLocationHandle, Location.ResourceItemHandle
Enclosing class:
Location

public static interface Location.Handle

A Location.Handle is a reference to a location. The point of a location handle is to be able to create them cheaply, and then resolve them into actual locations later (if needed). This makes it possible to for example delay looking up line numbers, for locations that are offset based.


Method Summary
 java.lang.Object getClientData()
          Returns the client data associated with this location - an optional field which can be used by the creator of the Location to store temporary state associated with the location.
 Location resolve()
          Compute a full location for the given handle
 void setClientData(java.lang.Object clientData)
          Sets the client data associated with this location.
 

Method Detail

resolve

@NonNull
Location resolve()
Compute a full location for the given handle

Returns:
create a location for this handle

setClientData

void setClientData(@Nullable
                   java.lang.Object clientData)
Sets the client data associated with this location. This is an optional field which can be used by the creator of the Location to store temporary state associated with the location.

Parameters:
clientData - the data to store with this location

getClientData

@Nullable
java.lang.Object getClientData()
Returns the client data associated with this location - an optional field which can be used by the creator of the Location to store temporary state associated with the location.

Returns:
the data associated with this location