public class ScanningContext
extends java.lang.Object
ScanningContext
keeps track of state during a resource file scan,
such as any parsing errors encountered, whether Android ids have changed, and
so on.Modifier and Type | Field and Description |
---|---|
protected ResourceRepository |
mRepository |
Constructor and Description |
---|
ScanningContext(ResourceRepository repository)
Constructs a new
ScanningContext |
Modifier and Type | Method and Description |
---|---|
void |
addError(java.lang.String error)
Adds the given error to the scanning context.
|
boolean |
checkValue(java.lang.String uri,
java.lang.String name,
java.lang.String value)
Asks the context to check whether the given attribute name and value is valid
in this context.
|
java.util.List<java.lang.String> |
getErrors()
Returns a list of errors encountered during scanning
|
ResourceRepository |
getRepository()
Returns the repository associated with this scanning context
|
boolean |
needsFullAapt()
Returns whether this repository has been marked as "dirty"; if one or
more of the constituent files have declared that the resource item names
that they provide have changed.
|
protected void |
requestFullAapt()
Marks that a full aapt compilation of the resources is necessary because it has
detected a change that cannot be incrementally handled.
|
protected final ResourceRepository mRepository
public ScanningContext(@NonNull ResourceRepository repository)
ScanningContext
repository
- the associated resource repository@Nullable public java.util.List<java.lang.String> getErrors()
public void addError(@NonNull java.lang.String error)
error
- the error message, including file name and line number at
the beginning@NonNull public ResourceRepository getRepository()
protected void requestFullAapt()
public boolean needsFullAapt()
public boolean checkValue(@Nullable java.lang.String uri, @NonNull java.lang.String name, @NonNull java.lang.String value)
uri
- the XML namespace URIname
- the attribute local namevalue
- the attribute value