Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] static inter-type field on interface not suppor ted

Hi Jim,
  I think I can NOT answer you if this limitation
cause me major annoynance but let you know my design
and the thinking behind it.
  First, of course I will intuitively use static field
in interface since static field is allowed in
Interface in Java language. Conversely, instance
fields are allowed in interface surprised me a little.
  Second, I use AspectJ to support my design for
dynamic properties added to objects of a class. Since
dynamic properties are added to objects at run time
v.s fixed properties are defined at class level at
compiling time, I need a static field called
'all_dynamic_properties' to manage those dynamic
proerties added to any object in the class. For any
dynamic property value getting, I go to this field to
check if this property was added to other objects
before for an object without this dynamic property
added. If it is, a null value is returned, otherwise a
property_not_defined_exception is thrown. 
With this limition, I can have this design. Will it
cause me anonynance? Staying at AspectJ 1.0.6 will
solve my problem since I do not use any new feature in
1.1 version. When I start to using features in 1.1, it
does cause me big anonynance.

Regards,
Rice



--- Jim.Hugunin@xxxxxxxx wrote:
> Rice Yeh wrote:
> >   I am migrating my code from AspectJ1.02 to
> 1.1rc2
> > and finding this compliation error message "static
> > inter-type field on interface not supported".
> Static
> > inter-type field is supported in 1.0. Now it is no
> > more supported. Is it a bug, or just not supported
> any
> > more?
> 
> This is an official compiler limitation for 1.1.0. 
> These fields are hard to implement correctly in the
> general case, and we believe that such fields can
> always be put directly on the aspect without causing
> any harm to the design.  If you have a good example
> of a case where this isn't true please send it to
> aspectj-users for discussion.
> 
> Is this causing you major problems moving to 1.1, or
> is it just a minor annoyance?
> 
> -Jim
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


Back to the top