import { AbstractUIClass } from "ui5plugin-parser/dist/classes/UI5Classes/UI5Parser/UIClass/AbstractUIClass" ; import { UI5Plugin } from "../../../../../../UI5Plugin" ; import { IAggregationGetterStrategy } from "../interfaces/IAggregationGetterStrategy" ; export class SAPClassAggregationGetterStrategy implements IAggregationGetterStrategy { private readonly _UIClass : AbstractUIClass ; constructor ( UIClass ) { this . _UIClass = UIClass ; } getParent ( ) { let theParent ; if ( this . _UIClass . parentClassNameDotNotation ) { const parentClass = UI5Plugin . getInstance ( ) . parser . classFactory . getUIClass ( this . _UIClass . parentClassNameDotNotation ) ; theParent = new SAPClassAggregationGetterStrategy ( parentClass ) ; } return theParent ; } getAggregations ( ) { return this . _UIClass . aggregations ; } getAggregation ( aggregation ) { return { name : aggregation . name , type : aggregation . type } ; } }