ASupport.scm 902 B

1234567891011121314151617181920212223242526272829
  1. (module-static 'init-run)
  2. (define-private verbose #f)
  3. ;; Your basic bean
  4. (define-simple-class <A> (<Base>)
  5. (target-axis-name init: "field value")
  6. ((get-target-axis-name) :: <String>
  7. (if verbose
  8. (display (format " ~A (A.getter() called)~%" target-axis-name)))
  9. target-axis-name)
  10. ((set-target-axis-name (v :: <String>)) :: <void>
  11. (if verbose
  12. (display (format " ~A (A.setter() called)~%" v)))
  13. (set! target-axis-name v)))
  14. ;; Bean with "hidden" field
  15. (define-simple-class <A2> (<Base>)
  16. (hidden-target-axis-name init: "field value")
  17. ((get-target-axis-name) :: <String>
  18. (if verbose
  19. (display (format " ~A (A2.getter() called)~%"
  20. hidden-target-axis-name)))
  21. hidden-target-axis-name)
  22. ((set-target-axis-name (v :: <String>)) :: <void>
  23. (if verbose
  24. (display (format " ~A (A2.setter() called)~%" v)))
  25. (set! hidden-target-axis-name v)))