AspectJ

AspectJ
Класс языка аспектно-ориентированный
Появился в 2001
Разработчик Eclipse Foundation
Расширение файлов .aj
Выпуск 1.9.9.1[1] (31 марта 2022; 4 года назад (2022-03-31))
Основные реализации AspectJ Development Tools для Eclipse
Испытал влияние Common Lisp
Лицензия Eclipse Public License
Сайт eclipse.org/aspectj/
ОС Кроссплатформенный
Логотип Викисклада Медиафайлы на Викискладе

AspectJаспектно-ориентированное расширение языка Java, созданное компанией PARC. Язык доступен в проектах Eclipse Foundation как отдельно, так и в составе среды разработки Eclipse. Язык стал де-факто стандартом аспектно-ориентированного программирования, подчёркивая простоту и удобство для пользователей. С первого выпуска язык использует Java-подобный синтаксис.

Простое описание языка

AspectJ расширяет синтаксис Java, то есть все программы, написанные на Java, будут корректными программами AspectJ, но не наоборот, так как могут включать специальные конструкции, называемые аспектами, которые могут содержать несколько частей, не доступных обычным классам.

  • Методы расширения позволяют программисту добавлять методы, поля и интерфейсы в существующие классы. Данный пример добавляет метод acceptVisitor (см. шаблон проектирования посетитель) в код класса Point:
aspect VisitAspect {
  void Point.acceptVisitor(Visitor v) {
    v.visit(this);
  }
}

Библиография

  • Laddad, Ramnivas (28 сентября 2009), AspectJ in Action: Enterprise AOP with Spring (2nd ed.), Manning Publications, p. 550, ISBN 978-1-933988-05-4
  • Miles, Russ (20 декабря 2004), AspectJ Cookbook (1st ed.), O'Reilly Media, p. 354, ISBN 978-0-596-00654-9
  • Colyer, Adrian; Clement, Andy; Harley, George; Webster, Matthew (24 декабря 2004), Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools (1st ed.), Addison-Wesley Professional, p. 504, ISBN 978-0-321-24587-8
  • Gradecki, Joseph D.; Lesiecki, Nicholas (7 марта 2003), Mastering AspectJ: Aspect-Oriented Programming in Java (1st ed.), Wiley, p. 456, ISBN 978-0-471-43104-6

См. также

Примечания

Ссылки

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.