tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-2554) 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
Date Tue, 05 Aug 2008 20:36:44 GMT
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message