Chapter 12
Frequently Asked Questions


How does one represent 'null'?

Given this Java code,

String name = null;

The equivilent Jace statement would be:

String name = java_cast<String>(0);

 

How does one convert a Jace peer to its equivilent proxy?

Say we are within a C++ Peer method, "this" refers to the current instance of the C++ peer. Now say we want to get a C++ proxy for this instance, we'd invoke:

MyProxy proxy = java_cast<MyProxy>(*this);

Previous