- «IF augmentType !== null»
- «IF impl»
- this.«AUGMENTATION_FIELD» = «ImmutableMap.importedName».copyOf(base.«AUGMENTATION_FIELD»);
- «ELSE»
- if (base instanceof «implType.importedName») {
- «implType.importedName» impl = («implType.importedName») base;
- if (!impl.«AUGMENTATION_FIELD».isEmpty()) {
- this.«AUGMENTATION_FIELD» = new «HashMap.importedName»<>(impl.«AUGMENTATION_FIELD»);
- }
- } else if (base instanceof «AugmentationHolder.importedName») {
- @SuppressWarnings("unchecked")
- «AugmentationHolder.importedName»<«fromType.importedName»> casted =(«AugmentationHolder.importedName»<«fromType.importedName»>) base;
- if (!casted.augmentations().isEmpty()) {
- this.«AUGMENTATION_FIELD» = new «HashMap.importedName»<>(casted.augmentations());
- }
- }
- «ENDIF»
- «ENDIF»