Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [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-




Back to the top