Skip to main content

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

oops, i can cast 'this' to the type i want...

- 101

:: 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
:: _______________________________________________
:: aspectj-users mailing list
:: aspectj-users@xxxxxxxxxxx 
:: http://dev.eclipse.org/mailman/listinfo/aspectj-users
:: 
:: 


Back to the top