o Added copy constructor

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@923403 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-03-15 19:35:45 +00:00
parent c13cd3abc4
commit d7d94af169
1 changed files with 30 additions and 0 deletions

View File

@ -65,6 +65,36 @@ public class DefaultModelBuildingRequest
private ModelCache modelCache;
/**
* Creates an empty request.
*/
public DefaultModelBuildingRequest()
{
}
/**
* Creates a shallow copy of the specified request.
*
* @param request The request to copy, must not be {@code null}.
*/
public DefaultModelBuildingRequest( ModelBuildingRequest request )
{
setPomFile( request.getPomFile() );
setModelSource( request.getModelSource() );
setValidationLevel( request.getValidationLevel() );
setProcessPlugins( request.isProcessPlugins() );
setTwoPhaseBuilding( request.isTwoPhaseBuilding() );
setProfiles( request.getProfiles() );
setActiveProfileIds( request.getActiveProfileIds() );
setInactiveProfileIds( request.getInactiveProfileIds() );
setSystemProperties( request.getSystemProperties() );
setUserProperties( request.getUserProperties() );
setBuildStartTime( request.getBuildStartTime() );
setModelResolver( request.getModelResolver() );
setModelBuildingListener( request.getModelBuildingListener() );
setModelCache( request.getModelCache() );
}
public File getPomFile()
{
return pomFile;