shared items

Wednesday, September 3, 2008

some more java

try
{
String sclass = ResourceBundle.getBundle("version-index").getString("index.type." + docType);
Class cls = Class.forName(sclass);

Class[] classes = { Properties.class };
Object[] params = { props };
Constructor ct = cls.getConstructor(classes);
return (IVersionIndex) ct.newInstance(params);
}
catch ( Exception any )
{
throw new IllegalArgumentException();
}

No comments: