Add name to platforms

This commit is contained in:
James Roseborough
2008-06-04 21:32:33 +00:00
parent 67581463d5
commit 96756a5096
4 changed files with 16 additions and 3 deletions

View File

@@ -100,6 +100,10 @@ abstract public class Platform {
return vm;
}
/** Get the name of the platform
*/
abstract public String getName();
/**
* Return an InputStream or null if not found for a particular file name.

View File

@@ -16,6 +16,10 @@ import org.luaj.vm.Platform;
public class J2meMidp10Cldc10Platform extends Platform {
protected MIDlet midlet;
public String getName() {
return "j2me";
}
public J2meMidp10Cldc10Platform(MIDlet midlet) {
this.midlet = midlet;
}

View File

@@ -17,10 +17,15 @@ import org.luaj.vm.LuaState;
import org.luaj.vm.Platform;
public class J2sePlatform extends Platform {
public String getName() {
return "j2se";
}
public Reader createReader(InputStream inputStream) {
return new InputStreamReader(inputStream);
}
}
public DebugNetSupport getDebugSupport() throws IOException {
DebugNetSupport debugNetSupport = new DebugSupportImpl(getDebugPort());
return debugNetSupport;

View File

@@ -1 +1 @@
version: 0.37
version: 0.38