4
import figures.primitives.planar.Point;
5
import figures.primitives.solid.SolidPoint;
9
private static Point startPoint;
11
public static void main(String[] args) {
13
System.out.println("> starting...");
15
startPoint = makeStartPoint();
16
//startPoint.setX(3); new Point(0, 0);
17
// SolidPoint sp1 = new SolidPoint(1, 3, 3);
21
} catch (RuntimeException re) {
24
System.out.println("> finished.");
27
/** @deprecated use something else */
28
public static Point makeStartPoint() {
29
//return new Point(1, 2);
33
/** This should produce a deprecation warning with JDK > 1.2 */
34
static class TestGUI extends javax.swing.JFrame {
40
/** This should produce a porting-deprecation warning. */
41
//static pointcut mainExecution(): execution(void main(*));
44
privileged aspect Test {
45
pointcut testptct(): call(* *.*(..));
47
before(Point p, int newval): target(p) && set(int Point.xx) && args(newval) {
48
System.err.println("> new value of x is: " + p.x + ", setting to: " + newval);
51
before(int newValue): set(int Point.*) && args(newValue) {
53
throw new IllegalArgumentException("too small");