当前位置: 首页>>代码示例>>Java>>正文


Java MIDletSystemProperties类代码示例

本文整理汇总了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);
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:23,代码来源:Common.java

示例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());

}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:29,代码来源:MIDletClassLoaderTest.java

示例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");
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:9,代码来源:FileSystem.java

示例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);
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:16,代码来源:Common.java

示例5: setDevice

import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public void setDevice(Device device) {
	MIDletSystemProperties.setDevice(device);
	DeviceFactory.setDevice(device);
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:5,代码来源:Common.java

示例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);
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:6,代码来源:FileSystem.java

示例7: checkPermission

import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public int checkPermission(String permission) {
    return MIDletSystemProperties.getPermission(permission);
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:4,代码来源:Common.java

示例8: setDevice

import org.microemu.app.util.MIDletSystemProperties; //导入依赖的package包/类
public void setDevice(Device device) {
    MIDletSystemProperties.setDevice(device);
    DeviceFactory.setDevice(device);
}
 
开发者ID:BombusMod,项目名称:BombusMod,代码行数:5,代码来源:Common.java

示例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);
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:11,代码来源:Injected.java


注:本文中的org.microemu.app.util.MIDletSystemProperties类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。