Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Inter-type member in combination with a private interface - Possible bug

This looks a lot bug-38824 which concerns inter-type declarations for an
abstract base class causing errors for each of its children.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/


aspectj-users-request@xxxxxxxxxxx@eclipse.org on 11/10/2003 17:00:01

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:    aspectj-users-admin@xxxxxxxxxxx


To:    aspectj-users@xxxxxxxxxxx
cc:
Subject:    aspectj-users digest, Vol 1 #326 - 2 msgs


Send aspectj-users mailing list submissions to
             aspectj-users@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
             http://dev.eclipse.org/mailman/listinfo/aspectj-users
or, via email, send a message with subject or body 'help' to
             aspectj-users-request@xxxxxxxxxxx

You can reach the person managing the list at
             aspectj-users-admin@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of aspectj-users digest..."


Today's Topics:

   1. Inter-type member in combination with a private interface - Possible
       bug (=?ISO-8859-1?Q?S=E9rgio_Soares?=)

--__--__--

Message: 1
Date: Fri, 10 Oct 2003 17:08:04 -0300
From: =?ISO-8859-1?Q?S=E9rgio_Soares?= <scbs@xxxxxxxxxxx>
Organization: CIn - UFPE
To: ajdt-dev@xxxxxxxxxxxxxxx, aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Inter-type member in combination with a private
interface - Possible
 bug
Reply-To: aspectj-users@xxxxxxxxxxx

Hi Everybody,

I was moving my environment from AspectJ 1.0.6 to 1.1 when I got an
error in a code that was OK before. Reading the programming guide I can
say that my code complies with AspectJ 1.1.

I created a simpler example to make the explanation easier. Consider
three classes X, Y and SubY. Note that class Y is an abstract class.

public class X {}

public abstract class Y {}

public class SubY extends Y {}

Now consider an aspect WhoAmI that defines an interface, Flag, with a
method whoami. The aspect changes classes X and Y to implement the
interface and add their implementation of the whoami method.

public aspect AspectWhoAmI {

     private interface Flag {
         public void whoami();
     }

     declare parents: X || Y implements Flag;

     public void X.whoami() {
         System.out.println("I am x");
     }

     public void Y.whoami() {
         System.out.println("I am Y");
     }
}

When compiling this example in eclipse 2.1.1 with AJDT 1.1.4 I got the
following error in class SubY "Class must implement the inherited method
WhoAmI.Flag.whoami()".

If I remove the abstract modifier from the class Y the code compiles
without errors. It seams to be a bug, doesn't it? The code complies
without erros if I remove the method signature from the Flag interface
keeping the abstract modifier in class Y. However, if I do this the
subtypes of Flag would not be forced to implement the whoami method at
compile time.

Best Regards,
Sergio


--
Sérgio Soares
Centro de Informática - UFPE
scbs@xxxxxxxxxxx
http://www.cin.ufpe.br/~scbs

Software Productivity Group
http://www.cin.ufpe.br/spg



--__--__--

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


End of aspectj-users Digest






Back to the top