本文整理汇总了Java中org.microemu.app.util.MIDletSystemProperties类的典型用法代码示例。如果您正苦于以下问题:Java MIDletSystemProperties类的具体用法?Java MIDletSystemProperties怎么用?Java MIDletSystemProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MIDletSystemProperties类属于org.microemu.app.util包,在下文中一共展示了MIDletSystemProperties类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Common
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public Common(EmulatorContext context) {
instance = this;
this.emulatorContext = context;
try {
launcher = new Launcher(this);
launcher.setCurrentMIDlet(launcher);
} finally {
MIDletBridge.setThreadMIDletContext(null);
}
/*
* Initialize secutity context for implemenations, May be there are
* better place for this call
*/
ImplFactory.instance();
MIDletSystemProperties.initContext();
// TODO integrate with ImplementationInitialization
ImplFactory.registerGCF(ImplFactory.DEFAULT, new ConnectorImpl());
MIDletBridge.setMicroEmulator(this);
}
示例2: testApplication
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public void testApplication() throws Exception {
ClassLoader parent = MIDletClassLoaderTest.class.getClassLoader();
URL jarURL = parent.getResource(TEST_APP_JAR);
assertNotNull("Can't find app jar", jarURL);
System.setProperty("test.verbose", "1");
MIDletSystemProperties.setProperty("test.property1", "1");
MIDletSystemProperties.setProperty("microedition.platform", null);
MIDletClassLoader.enhanceCatchBlock = false;
MIDletClassLoader mcl = new MIDletClassLoader(parent);
mcl.disableClassPreporcessing(Injected.class);
MIDletResourceLoader.classLoader = mcl;
mcl.addURL(jarURL);
Class instrumentedClass = mcl.loadClass(TEST_CLASS);
Runnable instrumentedInstance = (Runnable) instrumentedClass.newInstance();
instrumentedInstance.run();
LoggingEvent lastEvent = capture.getLastEvent();
assertNotNull("got event", lastEvent);
assertEquals("All tests OK", lastEvent.getMessage());
StackTraceElement ste = lastEvent.getLocation();
assertEquals("MethodName", "run", ste.getMethodName());
assertEquals("ClassName", TEST_CLASS, ste.getClassName());
}
示例3: registerImplementation
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public void registerImplementation(Map parameters) {
String fsRoot = (String) parameters.get(fsRootConfigProperty);
String fsSingle = (String) parameters.get(fsSingleConfigProperty);
this.impl = new FileSystemConnectorImpl(fsRoot);
ImplFactory.registerGCF("file", this.impl);
ImplFactory.register(FileSystemRegistryDelegate.class, new FileSystemRegistryImpl(fsRoot, fsSingle));
MIDletSystemProperties.setProperty(detectionProperty, "1.0");
}
示例4: Common
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public Common(EmulatorContext context) {
instance = this;
this.emulatorContext = context;
/*
* Initialize secutity context for implemenations, May be there are better place
* for this call
*/
ImplFactory.instance();
MIDletSystemProperties.initContext();
// TODO integrate with ImplementationInitialization
ImplFactory.registerGCF(ImplFactory.DEFAULT, new ConnectorImpl());
MIDletBridge.setMicroEmulator(this);
}
示例5: setDevice
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public void setDevice(Device device) {
MIDletSystemProperties.setDevice(device);
DeviceFactory.setDevice(device);
}
示例6: unregisterImplementation
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
protected static void unregisterImplementation(FileSystemConnectorImpl impl) {
MIDletSystemProperties.clearProperty(detectionProperty);
ImplFactory.unregistedGCF("file", impl);
ImplFactory.unregister(FileSystemRegistryDelegate.class, FileSystemRegistryImpl.class);
}
示例7: checkPermission
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public int checkPermission(String permission) {
return MIDletSystemProperties.getPermission(permission);
}
示例8: setDevice
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public void setDevice(Device device) {
MIDletSystemProperties.setDevice(device);
DeviceFactory.setDevice(device);
}
示例9: getProperty
import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
/**
* This code Ingected By MicroEmulator to enable access to System properties while running in Applet
*
* @param key the name of the system property.
* @return the string value of the system property,
* or <code>null</code> if there is no property with that key.
*/
public static String getProperty(String key) {
return MIDletSystemProperties.getProperty(key);
}