日期:2014-05-17 浏览次数:20789 次
Protocol localProtocol = (Protocol)Class.forName("protocol." + (this.class_name == null ? this.name : this.class_name)).newInstance();
localProtocol.type = Integer.parseInt(this.type);
localProtocol.size_policy = (this.maxsize == null ? 0 : Integer.parseInt(this.maxsize));
localProtocol.prior_policy = (this.priority == null ? 0 : Integer.parseInt(this.priority));
if (this.map.put(this.name.toUpperCase(), localProtocol) != null)
System.err.println("Duplicate protocol name " + this.name);
if (this.map.put(this.type, localProtocol) != null)
System.err.println("Duplicate protocol type " + this.type);
protected override mars Client(OS os)
{
i = os.type();
switch (i)
{
case 3:
return new Class1();
case 4:
return new Class2();
case 5:
return new Class3();
case 6:
return new Class4(); ... ... // 还有很多
}
return null;
}