Gang,
I promised to write some more complex testcases for Alin's Index/Query
engine, and wanted to do;
@Mixins( PasswordValue.PasswordMixin.class )
public interface PasswordValue extends Password, Initializable, ValueComposite
{
class PasswordMixin
implements Password
{
@This private PasswordState state;
public boolean isValid( String candidate )
{
return state.passPhrase().get().equals( candidate );
}
}
interface PasswordState
{
@Queryable( false )
Property<String> passPhrase();
}
}
which I think is a pretty neat way to hide the password state behind a
facade. BUT, then there is currently no way to initialize the private
mixin of the PasswordValue composite.
ValueBuilder has a prototype() method for the public view, but no
equivalent of stateFor() of regular composites, which I think it still
should have.
Cheers
Niclas
--
http://www.qi4j.org - New Energy for Java
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev