-
Type:
Story
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.10.0
-
Fix Version/s: 1.10.0
-
Component/s: YangCompiler
-
Labels:None
-
Story Points:3
-
Epic Link:
> 1. Currently every POJO has an interface, but I am not sure if
> interfaces are necessary for applications to use. The main issue I
> have with interfaces is that the "augmentation()" API does not exist
> on interfaces. Rather, it exists only on implementation classes, which
> inherit it from InnerModelObject. For example, consider the following
> function:
>
> private DeviceInfo buildDevVpnIns(Bearer bearer, VpnInstance ins,
> VpnSiteRole role, IpConnection connect)
>
> Bearer is an interface and does not have the augmentation() method. So
> only after we cast it to DefaultBearer, can we see that API. So, why
> can we not just pass in DefaultBearer directly?
>
> Another minor issue with using interfaces is that, if the application
> use interfaces, then it has to import both interfaces and
> implementations, which doubles the size of the import list. Depending
> on the complexity of the YANG model which an application uses, it may
> need to import lots of generated class, so the import list could
> become very long.