t-isio@ics.es.osaka-u.ac.jp - PowerPoint PPT Presentation

About This Presentation
Title:

t-isio@ics.es.osaka-u.ac.jp

Description:

... Java AspectJ ... Design Pattern Implementation in Java and AspectJ ... presentation format: – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 32
Provided by: Ish115
Category:

less

Transcript and Presenter's Notes

Title: t-isio@ics.es.osaka-u.ac.jp


1
??????????????????????????????????
  • ?? ?
  • ????? ??????2?
  • t-isio_at_ics.es.osaka-u.ac.jp

2
?????
  • ??????????????
  • ???????????????
  • ??????????
  • ???????????
  • ?????????????????
  • ??????????
  • ??????????????
  • ?????????
  • ?????

3
???????????
  • ?????????????????????
  • ???? ???????????????
  • ??????,????????? ???????

????????GUI??? GUI??????????? Database???
????????????
GUI
Student
???????
???????
Database
????
???????
Statistics
???????
Course
4
??????????
  • ????? ???????????
  • ????? (????, ??) ??????
  • ?????,????????????????
  • ???????????

Error Notification Aspect ????????????
???????
??? ??? ??
??
GUI
Student
Database
Statistics
Course
5
??????????????
  • ???????????
  • ??????
  • ????????????????????,?????
  • ???????
  • ???????????????
  • ???????????????????
  • ????????????
  • ?????????????????????
  • ????????
  • ???????????????????
  • ??????????????????????

6
??????
  • ???????????????????????????????????????????.
  • ??????????
  • ????????????????
  • ????????????
  • ???????????????????
  • ?? AspectJ

7
??????????
  • Aspect ???? Call Graph ???
  • ?????,??????????????(???)??
  • ??????????,??????????
  • (?????????????????)
  • ????????????????????????????
  • ?Call Graph????????????????????????????????

8
Call Graph ?
??
Aspect
Class
call
9
??????????????
  • ?????????????
  • ?????????????
  • ??????????????????????,??????
  • ??????????????????,????????????????????????
  • ???????????????????????????????????

10
????????????
  • ?????????s?????v(??????lts,vgt)??????????????
  • ?? ??-?? ??, if ???????
  • ?????????,??????????????
  • ???????????????????
  • ??????????

1 a 5 2 b a a 3 if (b gt 0) 4 c
a 5 6 d b
a
1 a 5 2 b a a 3 if (b gt 0) 4 c
a 5 6 d b
a
??lt 6, b gt
b
??
b
11
????????????
  • ???????
  • ??????? ?? ? ??
  • ?????(?????)? ?? ? ??
  • ??????
  • ????????? ? ??????
  • ????????? ? ????????????
  • ???????????? ? ?????????
  • ??????????
  • ??????????????????????????
  • ??(???)?? ?????
  • ?????????,???????????????????

12
?????????
  • ???????????????????
  • 1???????????????
  • ?????????
  • ??????????????
  • ?????????????
  • Java ??????????????
  • ? AspectJ ??????????????

???, ????, ???? ???????????????????????????",
2002??????????????????,D-3-4,p.30 (2002).
13
??????????
  • ?????? Eclipse ????
  • ????????????????
  • ???????????????????
  • ??????????????????
  • ?????????
  • Call Graph???,?????????
  • ??????????????????
  • ????????????????????????
  • ???????????????????????

14
????????????????
  1. ?????????????

15
????
  • ????
  • AspectJ ??????? 5??
  • ??????????????????
  • ????
  • ???????????,????????????????????
  • ????????????????????????
  • AJDE ????????????????????????
  • ???????????????500?

16
??
  • ???????????????
  • ??????????,????????????
  • ????????????????????????
  • ????????????????????
  • ????????????,??????????????????

17
????????????????
????????????
  • void foo()
  • x bar()
  • int bar()
  • return doSomething()
  • int baz()
  • return doSomething2()
  • aspect redirectMethodCall
  • int around() call(bar)
  • return baz()

????????? ??????????
18
?????
  • ?????
  • ??????????????????????????1????
  • ???????????????????,???????????????????10???
  • ?????
  • ????????????????????
  • ?????????????????????,?????????????
  • ?10000??????,????????????(1000?)???????,??????20MB
    ??500MB?????

19
???
  • ?????????????????
  • ???????????
  • ???,???????
  • ??????????????????????
  • Call Graph?????????
  • ?????????,???????????????
  • ????,????????????????????
  • ??????????????
  • ?????,??????????????
  • ????,??????????????????
  • ??????????????????
  • ?????
  • ??????????????????????????

20
  • ?

21
???????????
  • ?????????????????????
  • ??????????????????????????????
  • ????????,???????????????????????
  • ?????????????????
  • ? ?????????????????
  • ??????????????
  • ??????????????????????
  • ????????????,????????????????????
  • ?????????????????????????

22
????????????????
  • ???????????????????????
  • ???????????
  • ????????(??-??)
  • ???????????
  • ??????
  • ????????????(???,???)

23
?????????????
  • ???????????????????
  • ????????????????????????????????????
  • GoF ?????????????????????
  • ?????????????????????????????
  • ??????????,??????????????
  • ????????????????????????
  • ??????????,??????????????????????
  • ????????????????????????????

S. Soares, E. Laureano, P. Borba Implementing
Distribution and Persistence Aspects with
AspectJ'', OOPSLA 2002 J. Hannemann, G.
Kiczales Design Pattern Implementation in Java
and AspectJ', OOPSLA 2002
24
????????????
  • ??????????????????????
  • ????????????????????????
  • ? ????????????????
  • Java ?????????????????
  • Java Virtual Machine (JVM)???
  • ??????,????????????
  • JVM??? Profiler Interface ???
  • ??????????,????????????????
  • ??????????????????
  • ????????????,??????

25
?????????????
  • ?????????????????
  • 1???????????????
  • ?????????
  • ??????????????????
  • ?????????????
  • ????????????

?? ?,?? ??,?? ?? ??????????????? ????????????
???,?????????,???
26
?????????????
  • ??????????
  • ?????????????????????
  • ??????????,?????????????????
  • ??????,????????????????????
  • ????????
  • ???????????????????
  • ??????????????????????

?????????????!
  • ????????
  • ??????

27
?????????
  • ????????????????????
  • ??????????????,????????????????
  • ??????????

Client Object
Disk I/O Object
???? I/O ? ?????? I/O ?????? ?????
Network I/O Object
???? I/O ???????? ??????????????
28
?????????????
  • ?????????????????
  • ???? I/O ?????????????
  • ???????????????????????,???????????????

29
????????????
?????? ?????? (??????)
?????? ?????
30
???? ?? or ??
  • ??????????
  • ??????????????????????????
  • ??(???)?? ?????
  • ?????????,???????????????????
  • ???????
  • ?????(?????)? ?? ? ?? ??
  • ??????? ?? ? ?? ??
  • ??????
  • ????????? ? ??????
  • ????????? ? ????????????
  • ??????????????? ? ?????????

31
????
  • AspectJ IDE for JBuilder, Forte, Emacs
  • ???????????,???????????????????????????
  • ???????????????
  • ??????????????????????????????
  • ????,????????????????

AspectJ Official Site http//www.eclipse.org/a
spectj/
Jianjun Zhao, Slicing Aspect-Oriented
Software, In Proc. of the 10th IEEE
International Workshop on Programming
Comprehension, pp.251--260, 2002
Write a Comment
User Comments (0)
About PowerShow.com