<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    The reuse&&JBoss AOP
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/hsma">loupi loupi</a> in <i>JBoss AOP</i> - <a href="http://community.jboss.org/message/583176#583176">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p><strong>Hello,</strong></p><p><strong>First, <span id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">i</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">really</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">need</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">someone</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">to</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">answer me, </span></span><span id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">because I have</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">many</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">questions, </span>but <span class="hps" title="Cliquer ici pour voir d'autres traductions">in this forum</span> </span><span id="search" style="visibility: visible;">only a few people answer</span></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong><span style="visibility: visible;">Question N=&#176;1 </span><span id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">how</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">JBoss</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">AOP</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">defines</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">an</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">abstract aspect</span><span title="Cliquer ici pour voir d'autres traductions">?</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">and how</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">it</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">makes</span> the <span class="hps" title="Cliquer ici pour voir d'autres traductions">reuse?(</span></span><span id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">example</span> in AspectJ <span class="hps" title="Cliquer ici pour voir d'autres traductions">we</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">find</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions"> </span><span class="hps" title="Cliquer ici pour voir d'autres traductions">Abstarct aspect)</span></span></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong><span lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">Question N=&#176;2 </span></span><span id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">how</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">can</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">we</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">access</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">to</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">variable with</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">the</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">mixin</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">mechanism?</span></span><span id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">because</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">I</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">followed</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">your</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">example </span></span></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"><tbody><tr><th align="center" style="background-color: #6690bc;; border: 1px solid #000000;background-color: #6690bc;" valign="middle"><span style="color: #ffffff;"><strong>MixIN example</strong></span></th></tr><tr><td style="border: 1px solid #000000;"><p>package Fooo;</p><p>public class Foo {</p><p>&#160;&#160;&#160;&#160;&#160; public int fooField;</p><p>&#160;&#160;&#160;&#160;&#160; public Foo () {</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; fooField = 0;</p><p>&#160;&#160;&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; public String fooMethod (int i) {</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return Integer.toString (fooField + i);</p><p>&#160;&#160;&#160;&#160;&#160; }</p><p>&#160;&#160;&#160; }</p></td></tr><tr><td style="border: 1px solid #000000;"><p>package Fooo;</p><p>public interface FooMixinInt {</p><p>&#160;&#160;&#160;&#160;&#160; public String fooMethod2 (int i);</p><p>&#160;&#160;&#160; }</p></td></tr><tr><td style="border: 1px solid #000000;"><p>package Fooo;</p><p>public class FooMixin implements FooMixinInt {</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; public String fooMethod2 (int i) {</p><p>&#160;&#160;&#160;&#160;&#160;&#160; return Integer.toString (fooField - i);</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; }</p><p>&#160;&#160;&#160; }</p></td></tr><tr><td style="border: 1px solid #000000;"><p>package Fooo;</p><p>public class Main {</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public static void main(String[] args) {</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // TODO Auto-generated method stub</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Foo foo = new Foo ();</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; FooMixinInt fooint = (FooMixinInt) foo;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; String s = fooint.fooMethod2 (-2);</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>}</p></td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="jive-xml-tag">&lt;aop&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;introduction class="Fooo.Foo"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;mixin&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;interfaces&gt;</span>Fooo.FooMixinInt<span class="jive-xml-tag">&lt;/interfaces&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>Fooo.FooMixin<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;construction&gt;</span>new Fooo.FooMixin()<span class="jive-xml-tag">&lt;/construction&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/mixin&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/introduction&gt;</span>&#160; 
<span class="jive-xml-tag">&lt;/aop&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong><span id="result_box" lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">and</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">I</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">often find</span> <span class="hps" title="Cliquer ici pour voir d'autres traductions">this error:</span></span></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Exception in thread "main" java.lang.Error: Unresolved compilation problem: </p><p>&#160;&#160;&#160; fooField cannot be resolved</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; at Fooo.FooMixin.fooMethod2(FooMixin.java:6)</p><p>&#160;&#160;&#160; at Fooo.Foo.Fooo$Foo$fooMethod2$aop(Foo.java)</p><p>&#160;&#160;&#160; at Fooo.Foo$FooAdvisor.fooMethod24106554489332185313(Foo$FooAdvisor.java)</p><p>&#160;&#160;&#160; at Fooo.Foo.fooMethod2(Foo.java)</p><p>&#160;&#160;&#160; at Fooo.Main.main(Main.java:12)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong><span lang="en"><span class="hps" title="Cliquer ici pour voir d'autres traductions">Thank you <span> :) </span><br/></span></span></strong></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/583176#583176">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AOP at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>