Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] accessing members of this in intertype declarations

hi!

if i define an aspect with inter-type member declarations, is there any
way to access the this pointer of the type it's applied to.

i have a class C {}. i apply aspect A {} to a few subclasses of C. in
the body of a method in A i would like to access the C instance...

class C
{
	void bar()
	{
	}
}

class D extends C {}
class E extends C {}

aspect A
{
	private interface IA {};

	declare parents (C || D) implements IA;

	void IA.foo()
	{
		?.bar();
	}
}

C is in a library without an interface and i would not like to use
injar, but E should not get the functinality in A anyways.

or should i do this in a different way?

thanks,

- 101


Back to the top