polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislav Muhametsin <stanislav.muhamet...@kapsi.fi>
Subject Re: Java 8 use...
Date Tue, 30 Jun 2015 15:45:35 GMT
On 30.6.2015 18:16, Niclas Hedhman wrote:
> Ah! The full expansion of supertypes doesn't affect HasTypes#types() until
> after the assembly declarations are completed. I should have realized that
> up front.
>
> domainLayer.values( hasTypes -> matchesAny(
>      type -> Task.class.isAssignableFrom( type ), hasTypes.types() )
> ).withMixins( Identity.class );
>
>
> since Task is expected to be a 'hard' super type.
>

Semi-OT, in Qi4CS (current name) the same is achieved with:

Snippet          assembler
             .ForExistingPlainComposite()
             .OfTypes( typeof( Task ) )
             .WithMixins( typeof( Identity ) );

The "ForExistingPlainComposite" returns the same 
"CompositeAssemblyDeclaration" (IIRC this is same name as in Zest) 
interface as when declaring new composites with the 
"NewPlainComposite()" method.
"PlainComposite" here is a Qi4CS term which roughly is same as 
"TransientComposite" in Zest.
And "assembler" is architecture-neutral interface allowing the 
declaration of composites.

Lately though, I also been thinking of exposing the composite 
declarations more directly, like the "values" in your snippet, Niclas.
It would certainly bring more consistency between Qi4CS and Zest.

Mime
View raw message