TRAP : Transparent Reflective Aspect Programming
暂无分享,去创建一个
This paper introdu es transparent re e tive aspe t programming (TRAP), a generator framework to support eÆ ient, dynami , and tra eable adaptation in software. TRAP enables adaptive fun tionality to be added to an existing appli ation without modifying its sour e ode. To redu e overhead, TRAP enables the developer to sele t, at ompile time, a subset of lasses to support adaptation through runtime aspe t weaving. TRAP uses aspe t-oriented programming and behavioral re e tion to automati ally generate the required aspe ts and re e tive lasses asso iated with the sele ted types. At run time, new adaptive behavior an be introdu ed to the appli ation transparently with respe t to the original ode. TRAP an be applied to any obje t-oriented language that supports stru tural re e tion. A prototype, TRAP/J, whi h has been developed for use with Java appli ations, is des ribed. A ase study is presented in whi h TRAP was used to enable an existing audio-streaming appli ation to operate e e tively in a wireless network environment by adapting to hanging onditions.