org.objectweb.fractal.juliak.platform
Interface PlatformItf

All Known Implementing Classes:
PlatformJSE

public interface PlatformItf

Platform specific features.

Since:
2.5
Author:
Lionel Seinturier

Method Summary
 Class defineClass(String name, byte[] b)
          Define a new class.
 void dumpClassToFile(String dirname, String classname, byte[] b)
          Utility method to write the bytecode from a class to a file.
 Object getLoader()
          Return the loader used by Juliak for loading classes.
 InputStream getResourceAsStream(String name)
          Load a ressource.
 Class loadClass(String name)
          Load a class.
 void setLoader(Object cl)
          Set the loader to be used by Juliak for loading classes.
 

Method Detail

setLoader

void setLoader(Object cl)
Set the loader to be used by Juliak for loading classes.

Parameters:
cl - the loader. This parameter must implement ClassLoader. It is declared as an Object in order to be compliant with the Java ME CLDC version of Juliak.

getLoader

Object getLoader()
Return the loader used by Juliak for loading classes.

Returns:
the loader. This parameter must implement ClassLoader. It is declared as an Object in order to be compliant with the Java ME CLDC version of Juliak.

loadClass

Class loadClass(String name)
                throws ClassNotFoundException
Load a class.

Throws:
ClassNotFoundException

getResourceAsStream

InputStream getResourceAsStream(String name)
Load a ressource.


defineClass

Class defineClass(String name,
                  byte[] b)
Define a new class.


dumpClassToFile

void dumpClassToFile(String dirname,
                     String classname,
                     byte[] b)
                     throws IOException
Utility method to write the bytecode from a class to a file. This method creates the directory structure corresponding to package names.

Parameters:
dirname - the root directory name
classname - the name of the class
b - the bytecode
Throws:
IOException