[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
RE: [aspectj-users] Dynamic use of Inter-Type Declarations
|
- From: "Antti Karanta" <antti.karanta@xxxxxxx>
- Date: Tue, 28 Mar 2006 13:45:46 +0300
- Delivered-to: aspectj-users@eclipse.org
- Thread-index: AcZSTtqVX0tZzuzaTbqKUIKvNPYi9AABNhGw
- Thread-topic: [aspectj-users] Dynamic use of Inter-Type Declarations
> So the main point beeing. In the Genre dimention i would like the Leaf
> to implement the Editable interface, but in the Playlist dimention it
> should not.
>
> Is this at all possible ?
If I understood correctly what you want to do, I would say it's not
possible in Java/AspectJ. You can do things like that in more
dynamically oriented languages like Ruby (www.ruby-lang.org), though. No
interfaces there (as they are not needed), but you can modify classes at
runtime and define "singleton methods", i.e. methods only for a single
object (that may or may not override something in the class of the said
object), naturally at runtime.
-Antti-