[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Inter-type Declarations & Java 1.5 varargs
|
When you say 'not visible', I assume you mean you can't call it in its
varargs form? I compiled the aspect along with:
public class MyClass {
public static void main(String []argv) {
new MyClass().printNames(new Object[]{"a","b","c"});
new MyClass().printNames("a","b","c");
}
}
I get an error on the line attempting to call it using varargs, but
the line that passes an object array works fine. This suggests we
have a bug in not copying the varargs 'marker' flag across to the
members added to the target class for ITDs.
I've raised it as bug 110906
https://bugs.eclipse.org/bugs/show_bug.cgi?id=110906
Andy.
On 28/09/05, Tobias Dunn-Krahn <tdunn-krahn@xxxxxxxxxxxxxxxx> wrote:
>
>
>
> 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
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>