Ok, so I have a library which I need to wrap a bunch of classes. Not knowing java and reading the example I think I need to use AbsObjectWrapper.
The "creating libraries" tutorial shows this example;
I understand this but what if I have 100+ classes with various objects etc
Is there any way to automatically generate the above "mapping" ie these types of lines;
public int getCenterY() {return getObject().centerY();};
Thanks
Trevor
The "creating libraries" tutorial shows this example;
B4X:
@ShortName("Rect")
public static class RectWrapper extends AbsObjectWrapper<Rect> {
public void Initialize(int Left, int Top, int Right, int Bottom) {
Rect r = new Rect(Left, Top, Right, Bottom);
setObject(r);
}
public int getLeft() {return getObject().left;} public void setLeft(int Left) {getObject().left = Left;}
public int getTop() {return getObject().top;} public void setTop(int Top) {getObject().top = Top;}
public int getRight() {return getObject().right;} public void setRight(int Right) {getObject().right = Right;}
public int getBottom() {return getObject().bottom;} public void setBottom(int Bottom) {getObject().bottom = Bottom;}
/**
* Returns the horizontal center.
*/
public int getCenterX() {return getObject().centerX();};
/**
* Returns the vertical center.
*/
public int getCenterY() {return getObject().centerY();};
}
I understand this but what if I have 100+ classes with various objects etc
Is there any way to automatically generate the above "mapping" ie these types of lines;
public int getCenterY() {return getObject().centerY();};
Thanks
Trevor