Project

General

Profile

Bug #2047

Updated by Henning Blohm almost 5 years ago

Currently, as(TypeRef) defaults to as(Class) whenever possible.  

 Any wrapper resource that wants to intercept the call however needs two intercept two possibly equivalent calls now. 

 If C is to be intercepted, C may be specified by Class or TypeRef. Both checks are required as a delegation does not necessarily default to as(Class).  

 It should be like this however: 

 a) any invocation of as(Class) on IResourceHandle is translated if a call as(TypeRef) has a non-null class, the call should be defaulted to as(TypeRef) as(Class). 
 b) Resource.as(TypeRef) delegates by default to as(Class) if that is applicable. 


 Now, if C is as a class based type, it suffices to implement as(Class<C>) in wrapper the specialization of Resource, regardless how C is requested. same check should be performed for local interception

Back