Hi Rickard,

> (or null). In addition to this, it is suggested that annotations are 
> inherited, so that if you declare an annotation on an interface it is 
> "leaked" to the methods/properties. That way you can do this:
> @Immutable
> interface PersonValue
> {
>    Property<String> name();
> }
> and name() would then be an immutable property. This can be refactored to:
> @Immutable
> interface PersonValue
>    extends HasName
> {}

Does 'inheritance' also imply, that one can overwrite the inherited 
property type for a single property? So that something like the 
following is possible (a nice shorthand if many of the properties are 
immutable):

@Immutable
interface A
{
                Property<B>  x();
    @Computed   Property<C>  y();
}

which would then be equivalent to:

@Computed
interface A
{
    @Immutable  Property<B>  x();
                Property<C> y();
}

or

interface A
{
    @Immutable  Property<B>  x();
    @Computed   Property<C> y();
}


but then it would be possible to write something like:

interface X
{
                Property<U> s();
    @Computed   Property<V> t();
}

but not the other way around or
something like @Mutable is needed:

@Computed
interface X
{
    @Mutable    Property<U> s();
               Property<V> t();
}

Georg








_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to