javascript
public class TestObject extends JsProxyObject {
// the property of the object
private String name = "";
// the constructor with the property
public TestObject (String name) {
super ();
this.name = name;
// we hvae to initialize the proxy object
// with all properties of this object
init(this);
}
// this is a mandatory override,
// the proxy object needs this method
// to generate new objects if necessary
@Override
protected Object newInstance() {
return new TestClass(this.name);
}
// the setter for the property name
public void setName (String s) {
this.name = s;
}
// the getter for the property name
public String getName () {
return this.name;
}
}