Jskad/source/org/thdl/media/SmartPlayerFactory.bak

20 lines
569 B
Text
Raw Normal View History

import java.lang.reflect.*;
import java.util.*;
public static class SmartPlayerFactory {
static final String[] possiblePlayers
= {"org.thdl.media.SmartJMFPlayer", "org.thdl.media.SmartQT4JPlayer"};
static Class[] getAllAvailableSmartPlayers() {
List playerClasses = new ArrayList();
for (int i=0; i<possiblePlayers.length; i++) {
try {
Class mediaClass = Class.forName(possiblePlayers[i]);
playerClasses.add(mediaClass);
} catch (ClassNotFoundException cnfe) {
cnfe.printStackTrace();
}
}
return (Class[])playerClasses.toArray();
}
}