o Added generics

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@749482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-03-03 00:00:40 +00:00
parent cfbb4c4f54
commit ed6f76548b
4 changed files with 51 additions and 53 deletions

View File

@ -55,7 +55,7 @@ public class DefaultMavenExecutionRequest
private List profiles; private List profiles;
private List pluginGroups = new ArrayList(); private List<String> pluginGroups = new ArrayList<String>();
private boolean usePluginUpdateOverride; private boolean usePluginUpdateOverride;
@ -77,7 +77,7 @@ public class DefaultMavenExecutionRequest
private File basedir; private File basedir;
private List goals; private List<String> goals;
private boolean useReactor = false; private boolean useReactor = false;
@ -95,11 +95,11 @@ public class DefaultMavenExecutionRequest
private boolean showErrors = false; private boolean showErrors = false;
private List eventMonitors; private List<EventMonitor> eventMonitors;
private List activeProfiles; private List<String> activeProfiles;
private List inactiveProfiles; private List<String> inactiveProfiles;
private TransferListener transferListener; private TransferListener transferListener;
@ -181,7 +181,7 @@ public class DefaultMavenExecutionRequest
return localRepositoryPath; return localRepositoryPath;
} }
public List getGoals() public List<String> getGoals()
{ {
return goals; return goals;
} }
@ -222,7 +222,7 @@ public class DefaultMavenExecutionRequest
return interactiveMode; return interactiveMode;
} }
public List getEventMonitors() public List<EventMonitor> getEventMonitors()
{ {
return eventMonitors; return eventMonitors;
} }
@ -232,17 +232,17 @@ public class DefaultMavenExecutionRequest
this.basedir = basedir; this.basedir = basedir;
} }
public void setEventMonitors( List eventMonitors ) public void setEventMonitors( List<EventMonitor> eventMonitors )
{ {
this.eventMonitors = eventMonitors; this.eventMonitors = eventMonitors;
} }
public void setActiveProfiles( List activeProfiles ) public void setActiveProfiles( List<String> activeProfiles )
{ {
this.activeProfiles = activeProfiles; this.activeProfiles = activeProfiles;
} }
public void setInactiveProfiles( List inactiveProfiles ) public void setInactiveProfiles( List<String> inactiveProfiles )
{ {
this.inactiveProfiles = inactiveProfiles; this.inactiveProfiles = inactiveProfiles;
} }
@ -257,20 +257,20 @@ public class DefaultMavenExecutionRequest
this.projectBuildingConfiguration = projectBuildingConfiguration; this.projectBuildingConfiguration = projectBuildingConfiguration;
} }
public List getActiveProfiles() public List<String> getActiveProfiles()
{ {
if ( activeProfiles == null ) if ( activeProfiles == null )
{ {
activeProfiles = new ArrayList(); activeProfiles = new ArrayList<String>();
} }
return activeProfiles; return activeProfiles;
} }
public List getInactiveProfiles() public List<String> getInactiveProfiles()
{ {
if ( inactiveProfiles == null ) if ( inactiveProfiles == null )
{ {
inactiveProfiles = new ArrayList(); inactiveProfiles = new ArrayList<String>();
} }
return inactiveProfiles; return inactiveProfiles;
} }
@ -335,7 +335,7 @@ public class DefaultMavenExecutionRequest
return this; return this;
} }
public MavenExecutionRequest setGoals( List goals ) public MavenExecutionRequest setGoals( List<String> goals )
{ {
this.goals = goals; this.goals = goals;
@ -417,14 +417,14 @@ public class DefaultMavenExecutionRequest
return this; return this;
} }
public MavenExecutionRequest addActiveProfiles( List profiles ) public MavenExecutionRequest addActiveProfiles( List<String> profiles )
{ {
getActiveProfiles().addAll( profiles ); getActiveProfiles().addAll( profiles );
return this; return this;
} }
public MavenExecutionRequest addInactiveProfiles( List profiles ) public MavenExecutionRequest addInactiveProfiles( List<String> profiles )
{ {
getInactiveProfiles().addAll( profiles ); getInactiveProfiles().addAll( profiles );
@ -435,7 +435,7 @@ public class DefaultMavenExecutionRequest
{ {
if ( eventMonitors == null ) if ( eventMonitors == null )
{ {
eventMonitors = new ArrayList(); eventMonitors = new ArrayList<EventMonitor>();
} }
eventMonitors.add( monitor ); eventMonitors.add( monitor );
@ -574,12 +574,12 @@ public class DefaultMavenExecutionRequest
return this; return this;
} }
public List getPluginGroups() public List<String> getPluginGroups()
{ {
return pluginGroups; return pluginGroups;
} }
public MavenExecutionRequest setPluginGroups( List pluginGroups ) public MavenExecutionRequest setPluginGroups( List<String> pluginGroups )
{ {
this.pluginGroups = pluginGroups; this.pluginGroups = pluginGroups;

View File

@ -89,8 +89,8 @@ public interface MavenExecutionRequest
Date getStartTime(); Date getStartTime();
// Goals // Goals
MavenExecutionRequest setGoals( List goals ); MavenExecutionRequest setGoals( List<String> goals );
List getGoals(); List<String> getGoals();
// Properties // Properties
MavenExecutionRequest setProperties( Properties properties ); MavenExecutionRequest setProperties( Properties properties );
@ -113,7 +113,7 @@ public interface MavenExecutionRequest
// Event monitors // Event monitors
MavenExecutionRequest addEventMonitor( EventMonitor monitor ); MavenExecutionRequest addEventMonitor( EventMonitor monitor );
List getEventMonitors(); List<EventMonitor> getEventMonitors();
// Pom // Pom
MavenExecutionRequest setPomFile( String pomFilename ); MavenExecutionRequest setPomFile( String pomFilename );
@ -165,12 +165,12 @@ public interface MavenExecutionRequest
List getProfiles(); List getProfiles();
MavenExecutionRequest setProfiles( List profiles ); MavenExecutionRequest setProfiles( List profiles );
MavenExecutionRequest addActiveProfile( String profile ); MavenExecutionRequest addActiveProfile( String profile );
MavenExecutionRequest addActiveProfiles( List profiles ); MavenExecutionRequest addActiveProfiles( List<String> profiles );
List getActiveProfiles(); List<String> getActiveProfiles();
//MAPI: do we really need to do this? deactivate active profile? seems confusing. //MAPI: do we really need to do this? deactivate active profile? seems confusing.
MavenExecutionRequest addInactiveProfile( String profile ); MavenExecutionRequest addInactiveProfile( String profile );
MavenExecutionRequest addInactiveProfiles( List profiles ); MavenExecutionRequest addInactiveProfiles( List<String> profiles );
List getInactiveProfiles(); List<String> getInactiveProfiles();
// Proxies // Proxies
List getProxies(); List getProxies();
@ -185,8 +185,8 @@ public interface MavenExecutionRequest
MavenExecutionRequest setMirrors( List mirrors ); MavenExecutionRequest setMirrors( List mirrors );
// Plugin groups // Plugin groups
List getPluginGroups(); List<String> getPluginGroups();
MavenExecutionRequest setPluginGroups( List pluginGroups ); MavenExecutionRequest setPluginGroups( List<String> pluginGroups );
boolean isUsePluginUpdateOverride(); boolean isUsePluginUpdateOverride();
MavenExecutionRequest setUsePluginUpdateOverride( boolean usePluginUpdateOverride ); MavenExecutionRequest setUsePluginUpdateOverride( boolean usePluginUpdateOverride );
@ -211,7 +211,7 @@ public interface MavenExecutionRequest
MavenExecutionRequest setGlobalSettingsFile( File globalSettingsFile ); MavenExecutionRequest setGlobalSettingsFile( File globalSettingsFile );
MavenExecutionRequest addRemoteRepository( ArtifactRepository repository ); MavenExecutionRequest addRemoteRepository( ArtifactRepository repository );
List getRemoteRepositories(); List<ArtifactRepository> getRemoteRepositories();
MavenExecutionRequest setRealmManager( MavenRealmManager realmManager ); MavenExecutionRequest setRealmManager( MavenRealmManager realmManager );
MavenRealmManager getRealmManager(); MavenRealmManager getRealmManager();

View File

@ -95,10 +95,10 @@ public interface Configuration
Configuration addInactiveProfile( String profile ); Configuration addInactiveProfile( String profile );
/** Add a list of String instances with names of profiles to activate. */ /** Add a list of String instances with names of profiles to activate. */
Configuration addActiveProfiles( List profiles ); Configuration addActiveProfiles( List<String> profiles );
/** Add a list of String instances with names of profiles to inactivate. */ /** Add a list of String instances with names of profiles to inactivate. */
Configuration addInactiveProfiles( List profiles ); Configuration addInactiveProfiles( List<String> profiles );
/** Set a customizer callback implemetation that will be given a chance to modify the plexus container on startup. */ /** Set a customizer callback implemetation that will be given a chance to modify the plexus container on startup. */
Configuration setConfigurationCustomizer( ContainerCustomizer customizer ); Configuration setConfigurationCustomizer( ContainerCustomizer customizer );
@ -106,9 +106,9 @@ public interface Configuration
/** set the system properties to be used during the lifecycle of the embedder. Excluding the time when executing the project, then the properties from MavenExecutionRequestare used. */ /** set the system properties to be used during the lifecycle of the embedder. Excluding the time when executing the project, then the properties from MavenExecutionRequestare used. */
Configuration setSystemProperties( Properties properties ); Configuration setSystemProperties( Properties properties );
List getActiveProfiles(); List<String> getActiveProfiles();
List getInactiveProfiles(); List<String> getInactiveProfiles();
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Container Customizer // Container Customizer
@ -128,7 +128,7 @@ public interface Configuration
void addExtension( URL url ); void addExtension( URL url );
List getExtensions(); List<URL> getExtensions();
Configuration setRealmManager( MavenRealmManager realmManager ); Configuration setRealmManager( MavenRealmManager realmManager );
@ -148,7 +148,7 @@ public interface Configuration
Configuration addEventMonitor( EventMonitor eventMonitor ); Configuration addEventMonitor( EventMonitor eventMonitor );
Configuration setEventMonitors( List eventMonitors ); Configuration setEventMonitors( List<EventMonitor> eventMonitors );
List getEventMonitors(); List<EventMonitor> getEventMonitors();
} }

View File

@ -38,9 +38,9 @@ import java.util.Properties;
public class DefaultConfiguration public class DefaultConfiguration
implements Configuration implements Configuration
{ {
private List inactives; private List<String> inactives;
private List actives; private List<String> actives;
private File userSettings; private File userSettings;
@ -50,8 +50,7 @@ public class DefaultConfiguration
private Properties systemProperties; private Properties systemProperties;
/** List&lt;URL&gt;. */ private List<URL> extensions = new ArrayList<URL>();
private List extensions = new ArrayList();
private MavenEmbedderLogger logger; private MavenEmbedderLogger logger;
@ -65,8 +64,7 @@ public class DefaultConfiguration
private CoreErrorReporter errorReporter; private CoreErrorReporter errorReporter;
/** List&lt;EventMonitor&gt;. */ private List<EventMonitor> eventMonitors;
private List eventMonitors;
/** Creates a new instance of DefaultConfiguration */ /** Creates a new instance of DefaultConfiguration */
public DefaultConfiguration() public DefaultConfiguration()
@ -87,34 +85,34 @@ public class DefaultConfiguration
return this; return this;
} }
public Configuration addActiveProfiles( List profiles ) public Configuration addActiveProfiles( List<String> profiles )
{ {
getActiveProfiles().addAll( profiles ); getActiveProfiles().addAll( profiles );
return this; return this;
} }
public Configuration addInactiveProfiles( List profiles ) public Configuration addInactiveProfiles( List<String> profiles )
{ {
getInactiveProfiles().addAll( profiles ); getInactiveProfiles().addAll( profiles );
return this; return this;
} }
public List getActiveProfiles() public List<String> getActiveProfiles()
{ {
if ( actives == null ) if ( actives == null )
{ {
actives = new ArrayList(); actives = new ArrayList<String>();
} }
return actives; return actives;
} }
public List getInactiveProfiles() public List<String> getInactiveProfiles()
{ {
if ( inactives == null ) if ( inactives == null )
{ {
inactives = new ArrayList(); inactives = new ArrayList<String>();
} }
return inactives; return inactives;
} }
@ -168,7 +166,7 @@ public class DefaultConfiguration
extensions.add( url ); extensions.add( url );
} }
public List getExtensions() public List<URL> getExtensions()
{ {
return extensions; return extensions;
} }
@ -255,7 +253,7 @@ public class DefaultConfiguration
{ {
if ( eventMonitors == null ) if ( eventMonitors == null )
{ {
eventMonitors = new ArrayList(); eventMonitors = new ArrayList<EventMonitor>();
} }
eventMonitors.add( eventMonitor ); eventMonitors.add( eventMonitor );
@ -263,12 +261,12 @@ public class DefaultConfiguration
return this; return this;
} }
public List getEventMonitors() public List<EventMonitor> getEventMonitors()
{ {
return eventMonitors; return eventMonitors;
} }
public Configuration setEventMonitors( List eventMonitors ) public Configuration setEventMonitors( List<EventMonitor> eventMonitors )
{ {
this.eventMonitors = eventMonitors; this.eventMonitors = eventMonitors;
return this; return this;