summaryrefslogtreecommitdiff
path: root/tutorial/examples/rtrefl/Point.java
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/examples/rtrefl/Point.java')
-rw-r--r--tutorial/examples/rtrefl/Point.java107
1 files changed, 107 insertions, 0 deletions
diff --git a/tutorial/examples/rtrefl/Point.java b/tutorial/examples/rtrefl/Point.java
new file mode 100644
index 0000000..708c5ea
--- /dev/null
+++ b/tutorial/examples/rtrefl/Point.java
@@ -0,0 +1,107 @@
+/*
+ * This code was generated by ojc.
+ */
+/*
+ * Point.oj
+ */
+package examples.rtrefl;
+
+
+public class Point implements examples.rtrefl.RTMetaLevel
+{
+
+ public int x;
+
+ public int y;
+
+ public String name;
+
+ public Point( String name, int x, int y )
+ {
+ this.x = x;
+ this.y = y;
+ this.name = name;
+ }
+
+ public Point( int x, int y )
+ {
+ this( "DefaultName", x, y );
+ }
+
+ public String org_toString()
+ {
+ return "(" + x + "," + y + ")";
+ }
+
+ public void org_move( int dx, int dy )
+ {
+ x += dx;
+ y += dy;
+ }
+
+ public double org_distanceFromOrigin()
+ {
+ return Math.sqrt( (double) x * x + y * y );
+ }
+
+
+ public examples.rtrefl.RTMetaObject mt;
+
+
+ public java.lang.String toString()
+ {
+ return (java.lang.String) mt.trapMethodCall( "org_toString", new java.lang.Class[]{ }, new java.lang.Object[]{ } );
+ }
+
+
+ public void move( int oj_param0, int oj_param1 )
+ {
+ mt.trapMethodCall( "org_move", new java.lang.Class[]{ int.class, int.class }, new java.lang.Object[]{ new java.lang.Integer( oj_param0 ), new java.lang.Integer( oj_param1 ) } );
+ }
+
+
+ public double distanceFromOrigin()
+ {
+ return ((java.lang.Double) mt.trapMethodCall( "org_distanceFromOrigin", new java.lang.Class[]{ }, new java.lang.Object[]{ } )).doubleValue();
+ }
+
+
+ public int read_x()
+ {
+ return ((java.lang.Integer) mt.trapFieldRead( "x" )).intValue();
+ }
+
+
+ public int write_x( int oj_param0 )
+ {
+ mt.trapFieldWrite( "x", new java.lang.Integer( oj_param0 ) );
+ return oj_param0;
+ }
+
+
+ public int read_y()
+ {
+ return ((java.lang.Integer) mt.trapFieldRead( "y" )).intValue();
+ }
+
+
+ public int write_y( int oj_param0 )
+ {
+ mt.trapFieldWrite( "y", new java.lang.Integer( oj_param0 ) );
+ return oj_param0;
+ }
+
+
+ public java.lang.String read_name()
+ {
+ return (java.lang.String) mt.trapFieldRead( "name" );
+ }
+
+
+ public java.lang.String write_name( java.lang.String oj_param0 )
+ {
+ mt.trapFieldWrite( "name", oj_param0 );
+ return oj_param0;
+ }
+
+}