basics:intro
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
basics:intro [2007/02/23 10:26] – old revision restored bdefrain | basics:intro [2021/02/05 13:49] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | [[basics: | ||
+ | [[basics: | ||
+ | [[basics: | ||
+ | [[basics: | ||
+ | [[basics: | ||
+ | [[basics: | ||
+ | [[basics: | ||
+ | [[basics: | ||
====== The Basics: Intro ====== | ====== The Basics: Intro ====== | ||
- | In this exercise, you will use aspects to instrument a dummy class in order to get acquianted | + | In this exercise, you will use aspects to instrument a dummy class in order to get acquainted |
===== Set-up ===== | ===== Set-up ===== | ||
- Create a **new AspectJ Project** in Eclipse | - Create a **new AspectJ Project** in Eclipse | ||
- | - Create the following | + | - Create |
+ | - **Run** the code. Right-click | ||
<code aspectj> | <code aspectj> | ||
public class Application { | public class Application { | ||
Line 24: | Line 34: | ||
} | } | ||
- | public static void main(String[] | + | |
+ | return " | ||
+ | } | ||
+ | |||
+ | | ||
Application t = new Application(); | Application t = new Application(); | ||
+ | System.out.println(t); | ||
t.start(); | t.start(); | ||
t.stop(25); | t.stop(25); | ||
Line 33: | Line 48: | ||
} | } | ||
</ | </ | ||
- | | + | |
+ | You should see the following output on the **Console** view (which you can open through **Window** | ||
+ | |||
+ | < | ||
+ | Application go: 10 | ||
+ | Starting | ||
+ | Stopping | ||
+ | Stopping | ||
+ | java.lang.Exception: | ||
+ | </ | ||
+ | |||
+ | <note tip> | ||
+ | In the following | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Start the Basics track at [[basics: |
basics/intro.1172222762.txt.gz · Last modified: 2007/02/23 10:26 by bdefrain