Ticket #184 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 20 months ago

OT/J: support for callin-interception of constructor-calls

Reported by: mosconi Owned by: stephan
Priority: major Milestone: OTDT_2.0.0
Component: language Version: 1.2.4
Keywords: Cc:

Description (last modified by stephan) (diff)

Just to put this on our long-term radar.

Besides basic method interception there are several cases where a constructor call needs to be intercepted by a callin directly.

Change History

Changed 3 years ago by stephan

  • status changed from new to accepted

We need to carefully distinguish here:

  • after callins to a constructor are feasible with only some changes even in the current implementation, because the additional dispatch code can be inserted to the end of a constructor (about remaining differences/difficulties see below).
  • before and replace callins to a constructor must happen at the call site, i.e., we need call joinpoints rather than execution joinpoints. This part will have to wait until we generally support call joinpoints (which requires quantified joinpoint matching).

Remaining difficulties for after:

  • We cannot use the pattern of initial-wrapper, orig-method, chaining-wrapper, because the original constructor cannot be renamed, and any chaining of constructors would need to happen before any additional code is executed. A probable solution:
    • inline the lookup of active teams (normally done in the initial wrapper) into the end of the constructor.
    • generate a chaining wrapper containing only calls to after callins.
  • It will have to be checked, whether this proposed pattern solves all issues of inheritance in the same way as the normal callin implementation does.

When starting to work on this issue it should be split into two, I guess.

Changed 20 months ago by stephan

  • status changed from accepted to closed
  • resolution set to wontfix
  • description modified (diff)

Issue has moved to Eclipse bug 316616, won't be fixed from objectteams.org.

Note: See TracTickets for help on using tickets.