Java Reverse Foundation AspectJ Eclipse Plugin AJDT

Source: Internet
Author: User

AJDT is the Eclipse AspectJ development Tools. is an eclipse plugin that can write AspectJ projects

Installation

Help-->install New Software

Fill in the online installation address: http://download.eclipse.org/tools/ajdt/47_aj9/dev/update


After the installation is complete, create a new ASPECTJ project

The project structure is as follows

Copy the AJ file and the contents of the Java file from the previous blog.

The new method of the AJ file

File-->new-->project Select AspectJ Project

When running, select the Java file and right-click Run As-->aspectj/java Application

Run results


Here's a look at the configuration of the load project at run time

New project Structure


Where the AJ file content

Tracing.ajpublic aspect Tracing {private Pointcut Mainmethod (): Execution (public static void Main (string[])); Before (): Mainmethod () {System.out.println (">" + thisjoinpoint);} After (): Mainmethod () {System.out.println ("<" + Thisjoinpoint);}}

Run-->run configurations

Run project type select: Aspect load-time Weaving Application (the default is the one below Aspect/java application take care not to choose the wrong)

Project:aspectjdemo3

Main Class:com.zelix.ZKM

LTW Aspect Path: Add J external jar selection Zkm.jar


Finally click on the Run command in the configuration, the result is as follows

There is no use of export jar, are exported to compile period, can not export the load period, perhaps I will not use ...



Eclipse Plugin Ajdt for the aspectj of the Java Reverse Foundation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.