[ 
https://issues.apache.org/jira/browse/TAP5-1213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13997383#comment-13997383
 ] 

Lance commented on TAP5-1213:
-----------------------------

Some further analysis shows that PropertyConduit.getPropertyType() is 
implemented via plastic so PropertyConduit.getPropertyGenericType() will need 
to be implemented in a similar way.

{code}
   plasticClass.introduceMethod(ConduitMethods.GET_PROPERTY_TYPE, new 
InstructionBuilderCallback() {
      public void doBuild(InstructionBuilder builder) {
         builder.loadThis().getField(propertyTypeField).returnResult();
      }
   });
{code}

Code 
[here](https://github.com/apache/tapestry-5/blob/4255ec37f718e818fd1b6dd3dd0d48a5697b054e/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java#L297)

> ComponentResources should give access to generic parameters of bound types
> --------------------------------------------------------------------------
>
>                 Key: TAP5-1213
>                 URL: https://issues.apache.org/jira/browse/TAP5-1213
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.4, 5.1.0.7
>            Reporter: Michael Wyraz
>
> ComponentResources can tell which type is bound to a given parameter via 
> getBoundType(ParameterName). This is a great feature but only works for 
> non-generic types. If a generic type is bound, it's impossible to access the 
> generic parameters.
> Example:
> A component can bind to a Set of something. getBoundType returns 
> "java.util.Set" for this parameter. So it' not possible to coerce the entries 
> of this set to the target type.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to