/** * _more_ * * @param entry _more_ * @param properties _more_ * @return _more_ * @throws Exception _more_ */ private RecordFile doMakeRecordFile(Entry entry, Hashtable properties) throws Exception { String recordFileClass = getProperty("record.file.class", (String) null); if (recordFileClass != null) { return doMakeRecordFile(entry, recordFileClass, properties); } String path = entry.getFile().toString(); return (RecordFile) getRecordFileFactory().doMakeRecordFile(path, properties); }
/** * _more_ * * @param entry _more_ * @param className _more_ * @param properties _more_ * @return _more_ * @throws Exception _more_ */ private RecordFile doMakeRecordFile(Entry entry, String className, Hashtable properties) throws Exception { Class c = Misc.findClass(className); Constructor ctor = Misc.findConstructor(c, new Class[] {String.class, Hashtable.class}); if (ctor != null) { return (RecordFile) ctor.newInstance(new Object[] {entry.getFile().toString(), properties}); } ctor = Misc.findConstructor(c, new Class[] {String.class}); if (ctor != null) { return (RecordFile) ctor.newInstance(new Object[] {entry.getResource().getPath()}); } throw new IllegalArgumentException("Could not find constructor for " + className); }