git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7069
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
* The vector which contains the arguments of the main function
* of the process object.
*/
* The vector which contains the arguments of the main function
* of the process object.
*/
+ public Vector<String> args;
- public Hashtable properties;
+ public Hashtable<String,String> properties;
/**
* The name of the host of the process.
/**
* The name of the host of the process.
* Default constructor.
*/
public ProcessFactory() {
* Default constructor.
*/
public ProcessFactory() {
- this.args = new Vector();
- this.properties = new Hashtable();
+ this.args = new Vector<String>();
+ this.properties = new Hashtable<String,String>();
this.hostName = null;
this.function = null;
}
this.hostName = null;
this.function = null;
}
+ @SuppressWarnings("unchecked")
public void createProcess() {
try {
public void createProcess() {
try {
+ Class<simgrid.msg.Process> cls = (Class<Process>) Class.forName(this.function);
- Class cls = Class.forName(this.function);
-
- simgrid.msg.Process process = (simgrid.msg.Process) cls.newInstance();
+ simgrid.msg.Process process = cls.newInstance();
process.name = this.function;
process.id = simgrid.msg.Process.nextProcessId++;
Host host = Host.getByName(this.hostName);
process.name = this.function;
process.id = simgrid.msg.Process.nextProcessId++;
Host host = Host.getByName(this.hostName);
} catch(ClassNotFoundException e) {
System.out.println(this.function +
} catch(ClassNotFoundException e) {
System.out.println(this.function +
- " class not found\n The attribut function of the element process of your deployment file\n must correspond to the name of a Msg Proces class)");
+ " class not found\n The attribut function of the element process of your deployment file\n must correspond to the name of a Msg Proces class)");
e.printStackTrace();
} catch(InstantiationException e) {
e.printStackTrace();
} catch(InstantiationException e) {