On Fri, Aug 19, 2011 at 2:20 PM, Rickard Öberg <[email protected]> wrote:
> @Concerns(CapitalizeConcern.class)
> public static class AnyTransient
> implements TransientComposite
Is the "implements TransientComposite" really needed, or just
something you forgot to remove?
I assume it is not needed, since you answered Paul that Restlet system
can be enhanced now.
The next step is probably to allow a typed Concern as well;
public class CapitalizeConcern extends AnyTransient
{
@ConcernFor
AnyTransient next;
@Override
public String hello( String name)
{
if ( name != null)
{
return next.hello( name.toUpperCase() );
} else
return next.invoke( proxy, method, args );
}
}
}
Sounds like fairly straight forward as well...
IIUIC, Scala traits are subclassed like that, but "next" is done via
"super" which is handled by the compiler to be the next in chain.
Cheers
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev