[MDSAL-312] Split BindingGeneratorImpl into two classes Created: 23/Feb/18  Updated: 27/Mar/18  Resolved: 27/Mar/18

Status: Resolved
Project: mdsal
Component/s: Binding codegen, Binding runtime
Affects Version/s: None
Fix Version/s: Fluorine

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks MDSAL-315 Provide segregated runtime and codege... Resolved
is blocked by MDSAL-313 Differentiate between declared (XSD) ... Resolved

 Description   

Binding runtime and codegen are sharing BindingGeneratorImpl, but their expectations around it are a bit different:

  • codegen needs the entire, thick, type definition to correctly generate classes along with their enforcement strategies.
  • runtime needs just skinny type definitions to understand the structure, without comments, descriptions, regexes, etc.

We already have the beginnings of this split in the skinnyTypes flag passed to the constructor, but this needs to be extended so that we have three classes:

  • AbstractBindingGenerator with callouts
  • FullBindingGenerator which fills in things like comments, etc.
  • SkinnyBindingGenerator co-located with BindingRuntimeContext, which does not fill in unnecessary things

This also needs to be extended to TypeProviderImpl, so that we get rid of method comments from the runtime environment.

The upshot from this is a leader BindingRuntimeContext and a faster SkinnyBindingGenerator, because the FullBindingGenerator will never be loaded at runtime.

 



 Comments   
Comment by Robert Varga [ 03/Mar/18 ]

Generator split: https://git.opendaylight.org/gerrit/69021

TypeProvider split: https://git.opendaylight.org/gerrit/69022

Disable pattern tracking: https://git.opendaylight.org/gerrit/69035

 

Generated at Wed Feb 07 20:09:30 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.