@Component(role=ModelProcessor.class) public class DefaultModelProcessor extends Object implements ModelProcessor
SOURCE
INPUT_SOURCE, IS_STRICT
Constructor and Description |
---|
DefaultModelProcessor() |
Modifier and Type | Method and Description |
---|---|
File |
locatePom(File projectDirectory)
Locates the POM file within the specified project directory.
|
Model |
read(File input,
Map<String,?> options)
Reads the model from the specified file.
|
Model |
read(InputStream input,
Map<String,?> options)
Reads the model from the specified byte stream.
|
Model |
read(Reader input,
Map<String,?> options)
Reads the model from the specified character reader.
|
DefaultModelProcessor |
setModelLocator(ModelLocator locator) |
DefaultModelProcessor |
setModelReader(ModelReader reader) |
public DefaultModelProcessor()
public DefaultModelProcessor setModelLocator(ModelLocator locator)
public DefaultModelProcessor setModelReader(ModelReader reader)
public File locatePom(File projectDirectory)
ModelLocator
locatePom
in interface ModelLocator
projectDirectory
- The (possibly non-existent) base directory to locate the POM file in, must not be null
.null
.public Model read(File input, Map<String,?> options) throws IOException
ModelReader
read
in interface ModelReader
input
- The file to deserialize the model from, must not be null
.options
- The options to use for deserialization, may be null
to use the default values.null
.IOException
- If the model could not be deserialized.ModelParseException
- If the input format could not be parsed.public Model read(Reader input, Map<String,?> options) throws IOException
ModelReader
read
in interface ModelReader
input
- The reader to deserialize the model from, must not be null
.options
- The options to use for deserialization, may be null
to use the default values.null
.IOException
- If the model could not be deserialized.ModelParseException
- If the input format could not be parsed.public Model read(InputStream input, Map<String,?> options) throws IOException
ModelReader
read
in interface ModelReader
input
- The stream to deserialize the model from, must not be null
.options
- The options to use for deserialization, may be null
to use the default values.null
.IOException
- If the model could not be deserialized.ModelParseException
- If the input format could not be parsed.Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.