When decorating a service using a decorate method, the underlying service (or 
interceptor) should be available as a parameter of the service type, not 
java.lang.Object
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: TAPESTRY-2554
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2554
             Project: Tapestry
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.0.13
            Reporter: Howard M. Lewis Ship
            Priority: Minor


Currently, the delegate object (the underlying service, or the next filter in 
the chain) must be present as a parameter of the decorating method, as type 
Object.

This makes sense for more general decorations, as Java Generics will likely be 
used:

public <T> T decorateXYZ(Class<T> serviceInterface, T service) { ... }

The service object will, after erasure, be java.lang.Object.

However, when decorating a specific service, where the service interface is 
known a-priori, the delegate must still be passed as java.lang.Object.

Possibly, it will be necessary to use an annotation to be clear that the 
parameter in question is the delegate, and not a service injection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to