Bug 1144 - Add 'DelegateImplementation', manually impl. may delegate to renamed original
Summary: Add 'DelegateImplementation', manually impl. may delegate to renamed original
Status: RESOLVED FIXED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2.3.0
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 1135
  Show dependency treegraph
 
Reported: 2015-03-10 08:10 CET by Sven Gothel
Modified: 2019-03-29 17:54 CET (History)
0 users

See Also:
Type: ---
SCM Refs:
454fac44efd1728d8f5c09ed4abd4041f6187e44 c3b2a86bb9051d6f03c3f104eff2dbe6cefc1803 f664f7e950ff60d73e488801cf7f37878588203d 405512e1c8a2e24834b0d057f0b020b4a0f4c25b bbea09816015ecf3596acdcc033553127fcc0ef3 213d01cac6bb0b91e85dbacb5cd4dff539881780
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2015-03-10 08:10:42 CET
'DelegateImplementation' is a variation of 'ManuallyImplement'.

'ManuallyImplement' emits the interface method, but suppresses
the Java and native-code implementation.
The latter shall be implemented manually by the user.

'DelegateImplementation' emits the interface method, 
and the renamed Java and native-code implementation.
Both can be called from the manual user implementation,
hence delegation.
Comment 1 Sven Gothel 2015-03-10 08:17:38 CET
Configuration:
  DelegateImplementation <ORIG-SYMBOL> <RENAMED-IMPL-SYMBOL>

I.e. delegation model shall apply to <ORIG-SYMBOL>
and the Java and native-code implementation renamed to <RENAMED-IMPL-SYMBOL>.

The user manual implementation of <ORIG-SYMBOL>
may delegate to <RENAMED-IMPL-SYMBOL>.
Comment 2 Sven Gothel 2015-03-11 18:39:42 CET
454fac44efd1728d8f5c09ed4abd4041f6187e44
c3b2a86bb9051d6f03c3f104eff2dbe6cefc1803
f664f7e950ff60d73e488801cf7f37878588203d
405512e1c8a2e24834b0d057f0b020b4a0f4c25b
   'DelegateImplementation' is a variation of 'ManuallyImplement'.
    
    'ManuallyImplement' emits the interface method, but suppresses
    the Java and native-code implementation.
    The latter shall be implemented manually by the user.
    
    'DelegateImplementation' emits the interface method,
    and the _private_ renamed Java and native-code implementation.
    Both can be called from the manual user implementation,
    hence delegation.
    
    Configuration:
      DelegateImplementation <ORIG-SYMBOL> <RENAMED-IMPL-SYMBOL>
    
    I.e. delegation model shall apply to <ORIG-SYMBOL>
    and the Java and native-code implementation renamed to <RENAMED-IMPL-SYMBOL>.
    
    The user manual implementation of <ORIG-SYMBOL>
    may delegate to <RENAMED-IMPL-SYMBOL>.

bbea09816015ecf3596acdcc033553127fcc0ef3
    - DelegateImplementation requires own MethodBinding for delegates impl.
      The delegation name must be included within
      the FunctionSymbol's aliases _only_ for implementations,
      where delegation applies.
      This allows all subsequent type/cfg checks to hit on AliasedSymbol!
    
      Hence we need to create individual MethodBinding instances
      for interfaces and public/private implementations.
    
    - Adding ReturnsOpaque
      Configuration:
        ReturnsOpaque <Primitive Java Type> <Function Name>
    
      This feature is necessary to achieve 'Opaque' functionality
      for function's return type - instead of types in general.
    
    - Fix AliasedSymbolImpl copy-ctor, i.e. this.name = o.name !

213d01cac6bb0b91e85dbacb5cd4dff539881780