Add JIO getclass
This commit is contained in:
parent
6d29b9d8d4
commit
8b55f0921f
2 changed files with 17 additions and 0 deletions
|
@ -892,6 +892,18 @@ public class ISBPL {
|
|||
}
|
||||
};
|
||||
break;
|
||||
case "jio.getclass":
|
||||
func = (stack) -> {
|
||||
ISBPLObject str = stack.pop();
|
||||
String s = toJavaString(str);
|
||||
try {
|
||||
stack.push(toISBPL((Object) Class.forName(s)));
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
throw new ISBPLError("JIO", "Class not found");
|
||||
}
|
||||
};
|
||||
break;
|
||||
default:
|
||||
func = natives.get(name);
|
||||
break;
|
||||
|
|
|
@ -92,6 +92,11 @@ def TYPE_JIO "jio" mktype =TYPE_JIO
|
|||
native jio.class
|
||||
jio.class
|
||||
} TYPE_JIO defmethod
|
||||
"getclass" {
|
||||
pop
|
||||
native jio.getclass
|
||||
jio.getclass
|
||||
} TYPE_JIO defmethod
|
||||
def JIO 0 TYPE_JIO settype =JIO
|
||||
|
||||
def TYPE_STRING "string" mktype =TYPE_STRING
|
||||
|
|
Loading…
Add table
Reference in a new issue