Project

General

Profile

Bug #2047

Use of as(TypeRef) broken

Added by Henning Blohm about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
z2-core
Target version:
Start date:
10.11.2019
Due date:
% Done:

0%

Estimated time:
origin:

Description

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 to as(TypeRef)
b) Resource.as(TypeRef) delegates by default to as(Class) if that is applicable.

Now, if C is a class based type, it suffices to implement as(Class<C>) in the specialization of Resource, regardless how C is requested.

#1

Updated by Henning Blohm almost 5 years ago

  • Description updated (diff)
#2

Updated by Henning Blohm almost 5 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF