Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Inter-type Declarations & Java 1.5 varargs

Hello All,

 

I’m having a problem with varargs methods in inter-type declarations.  The following works:

 

public aspect A {

            private interface HasName {}

 

            declare parents: (MyClass) implements HasName;

 

            public void HasName.printName(Object name) {

                        System.out.println(name);

            }

}

 

That is, I can call printName() from MyClass.  However, the following fails:

 

public aspect A {

            private interface HasName {}

 

            declare parents: (MyClass) implements HasName;

 

            public void HasName.printNames(Object… names) {

                        System.out.println(names[0]);

            }

}

 

In this case, printNames() is not visible to MyClass.  Is this a known issue?

 

Thanks,

Tobias


Back to the top