org.microemu
Class Injected

java.lang.Object
  extended by org.microemu.Injected
All Implemented Interfaces:
java.io.Serializable

public final class Injected
extends java.lang.Object
implements java.io.Serializable

Author:
vlads This code is added to MIDlet application to solve problems with security policy while running in Applet and Webstart. Also solves resource resource loading paterns commonly used in MIDlet and not aceptable in Java SE application The calls to this code is injected by ClassLoader or "Save for Web...". This class is used instead injected one when application is running in Applet with MicroEmulator. Serializable is just internal flag to verify tha proper class is loaded by application.
See Also:
Serialized Form

Field Summary
static java.io.PrintStream err
           
static java.io.PrintStream out
          This allow redirection of stdout to MicroEmulator console
 
Method Summary
static java.lang.String getProperty(java.lang.String key)
          This code Ingected By MicroEmulator to enable access to System properties while running in Applet
static java.io.InputStream getResourceAsStream(java.lang.Class origClass, java.lang.String name)
          Returns an input stream for reading the specified resource.
static java.lang.Throwable handleCatchThrowable(java.lang.Throwable t)
          TODO fix ChangeCallsMethodVisitor
static void printStackTrace(java.lang.Throwable t)
          Redirect throwable.printStackTrace() to MicroEmulator console
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public static final java.io.PrintStream out
This allow redirection of stdout to MicroEmulator console


err

public static final java.io.PrintStream err
Method Detail

printStackTrace

public static void printStackTrace(java.lang.Throwable t)
Redirect throwable.printStackTrace() to MicroEmulator console


getProperty

public static java.lang.String getProperty(java.lang.String key)
This code Ingected By MicroEmulator to enable access to System properties while running in Applet

Parameters:
key - the name of the system property.
Returns:
the string value of the system property, or null if there is no property with that key.

getResourceAsStream

public static java.io.InputStream getResourceAsStream(java.lang.Class origClass,
                                                      java.lang.String name)
Returns an input stream for reading the specified resource.

The search order is described in the documentation for #getResource(String).

Parameters:
origClass -
name - The resource name
Returns:
An input stream for reading the resource, or null if the resource could not be found

handleCatchThrowable

public static java.lang.Throwable handleCatchThrowable(java.lang.Throwable t)
TODO fix ChangeCallsMethodVisitor



Copyright © 2001-2009 MicroEmulator Team. All Rights Reserved.