mirror of https://github.com/adamdruppe/arsd.git
better
This commit is contained in:
parent
0fed9f70de
commit
acf94a0fef
7
jni.d
7
jni.d
|
@ -568,7 +568,7 @@ void rawClassStructToD()(ref ClassFile cf, string dPackagePrefix, string outputD
|
|||
mainThing ~= proto;
|
||||
|
||||
if(oargs.length == 0 && name == "toString_" && !(method.flags & 0x0008))
|
||||
mainThing ~= "\toverride string toString() { return toString_(); }\n";
|
||||
mainThing ~= "\toverride string toString() { return arsd.jni.javaObjectToString(this); }\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1808,6 +1808,11 @@ interface IJavaObject {
|
|||
enum Export; /// UDA to indicate you are exporting the method to Java. Put a D implementation body on these. Only put these on implementation classes, not interfaces.
|
||||
}
|
||||
|
||||
string javaObjectToString(IJavaObject i) {
|
||||
return "FIXME";
|
||||
}
|
||||
|
||||
|
||||
static T fromExistingJavaObject(T)(jobject o) if(is(T : IJavaObject) && !is(T == interface)) {
|
||||
import core.memory;
|
||||
auto ptr = GC.malloc(__traits(classInstanceSize, T));
|
||||
|
|
Loading…
Reference in New Issue