<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://soft.vub.ac.be/ajtraining/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://soft.vub.ac.be/ajtraining/feed.php">
        <title>AspectJ 5 Training - basics</title>
        <description></description>
        <link>https://soft.vub.ac.be/ajtraining/</link>
        <image rdf:resource="https://soft.vub.ac.be/ajtraining/_media/wiki:dokuwiki-128.png" />
       <dc:date>2026-05-16T01:31:29+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:ex1?rev=1612529368&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:ex2?rev=1612529368&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:ex3?rev=1612529368&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:ex4?rev=1612529368&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:ex5?rev=1612529368&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:ex6?rev=1612529368&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:ex7?rev=1612529368&amp;do=diff"/>
                <rdf:li rdf:resource="https://soft.vub.ac.be/ajtraining/basics:intro?rev=1612529368&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://soft.vub.ac.be/ajtraining/_media/wiki:dokuwiki-128.png">
        <title>AspectJ 5 Training</title>
        <link>https://soft.vub.ac.be/ajtraining/</link>
        <url>https://soft.vub.ac.be/ajtraining/_media/wiki:dokuwiki-128.png</url>
    </image>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:ex1?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex1</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:ex1?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Exercise 1

Create an aspect named Basics with an auxiliary method output:


public aspect Basics {

  public void output(String tag, Object o) {
    System.out.println(tag + &quot;: &quot; + o);
  }

}


Next, add an advice to this aspect to prints a string just before the execution of the</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:ex2?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex2</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:ex2?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Exercise 2

Add another advice to the Basics aspect to print out a message immediately before the execution of all methods of Application whose name starts with the letters “st”.
*..

Since the advice applies to different methods, print the signature of the join point in the advice body using the following snippet:</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:ex3?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex3</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:ex3?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Exercise 3

Add another advice to the Basics aspect to print out a signature before the execution of all non-static methods of class Application, except for the start method.

	*  The signature pattern may contain modifiers (such as</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:ex4?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex4</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:ex4?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Exercise 4

Add another advice to the aspect Basics that prints a message containing the input value of the method stop immediately before it is executed.
args(Var,...)Var

Rerun the application and verify the output.

----------</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:ex5?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex5</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:ex5?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Exercise 5

Add another advice to the aspect Basics that only prints a message when the stop method is executed through the start method.
cflow(Pointcut)

Rerun the application and verify that the advice does not trigger when stop</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:ex6?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex6</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:ex6?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Exercise 6

Add another advice in the aspect Basics to print a message after a method of class Application exits with an exception. The message should contain a description of the exception.
after() throwing(Exception e)before

Rerun the application and verify that the advice outputs a description for the exception raised inside of the</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:ex7?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ex7</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:ex7?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Exercise 7

From the aspect Basics, declare that the class Application implements the interface Iterable&lt;String&gt;.
declare parents: Type implements Type

This will raise a compiler error since Application does not provide an implementation for the</description>
    </item>
    <item rdf:about="https://soft.vub.ac.be/ajtraining/basics:intro?rev=1612529368&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-02-05T12:49:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>intro</title>
        <link>https://soft.vub.ac.be/ajtraining/basics:intro?rev=1612529368&amp;do=diff</link>
        <description>Intro
Ex1
Ex2
Ex3
Ex4
Ex5
Ex6
Ex7

The Basics: Intro

In this exercise, you will use aspects to instrument a dummy class in order to get acquainted with the basic techniques of AspectJ: pointcuts, advices and inter-type declarations.

Set-up

	*  Create a new AspectJ Project in Eclipse</description>
    </item>
</rdf:RDF>
