public class IdResourceParser
extends java.lang.Object
ValueResourceParser.IValueResourceRepository
, and which registers errors with a
ScanningContext
.Constructor and Description |
---|
IdResourceParser(ValueResourceParser.IValueResourceRepository repository,
ScanningContext context,
boolean isFramework)
Creates a new
IdResourceParser |
Modifier and Type | Method and Description |
---|---|
boolean |
parse(com.android.resources.ResourceType type,
java.lang.String path,
java.io.InputStream input)
Parse the given input and register ids with the given
ValueResourceParser.IValueResourceRepository . |
public IdResourceParser(@NonNull ValueResourceParser.IValueResourceRepository repository, @NonNull ScanningContext context, boolean isFramework)
IdResourceParser
repository
- value repository for registering resource declarationcontext
- a context object with state for the current update, such
as a place to stash errors encounteredisFramework
- true if scanning a framework resourcepublic boolean parse(com.android.resources.ResourceType type, java.lang.String path, java.io.InputStream input) throws java.io.IOException
ValueResourceParser.IValueResourceRepository
.type
- the type of resource being scannedpath
- the full OS path to the file being parsedinput
- the input stream of the XML to be parsed (will be closed by this method)java.io.IOException
- if reading the contents fails