void
. For example, the program below
Point p = new Point(); p.x = 3;
can be translated into:
Point p = new Point(); Accessor.writeX(3);
where
public class Accessor { public static void writeX(Object target, int value) { ... } }
The type of the first parameter of writeX()
must be java.lang.Object
independently of the actual type of target
. The type of the second parameter is the same as the field type.
@param field the field.
@param calledClass the class in which the static method isdeclared.
@param calledMethod the name of the static method.
|
|
|
|
|
|