Hi,
As I go through the runtime of Qi4j, I can see that computed properties
mess things up quite a bit. Specifically, their creation require a
PropertyInfo to be supplied, which is a bit messy, and there's also
quite a few "if"'s in the code for computed properties. Also, I've
implemented Qi4jSPI.getPropertyDescriptor(property), but that one
doesn't quite work for computed properties.
So a question is: how useful are they, and could they be replaced with
something else? How many of you are actually using computed properties,
and what are the use-cases? In your usecases, what would happen if they
were simply replaced with methods?
I.e. instead of:
@Computed
Property<String> comp();
Property<String> comp()
{
return new ComputedPropertyInstance(...)
{
public String get()
{
return ...;
}
}
}
could you do:
String comp();
String comp()
{
return ...;
}
That would simplify things a whoooole lot :-)
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev