src/sap.ui.rta/src/sap/ui/rta/util/BindingsExtractor.js
function flattenBindings(oBinding, oParentDefaultModel) {
		var aBindings = [];
		var sModelName = oBinding.getMetadata().getName();

		if (sModelName === "sap.ui.model.CompositeBinding") {
			oBinding.getBindings().forEach(function (oBinding) {
				aBindings = aBindings.concat(flattenBindings(oBinding, oParentDefaultModel));
			});
		} else if (
			(
				sModelName === "sap.ui.model.odata.ODataPropertyBinding"
				|| sModelName === "sap.ui.model.odata.v2.ODataPropertyBinding"
				|| sModelName === "sap.ui.model.odata.v4.ODataPropertyBinding"
				|| sModelName === "sap.ui.model.json.JSONPropertyBinding"
				|| sModelName === "sap.ui.model.json.XMLPropertyBinding"
				|| sModelName === "sap.ui.model.resource.ResourcePropertyBinding"
			)
			&& oBinding.getModel() === oParentDefaultModel
			&& oBinding.isRelative()
			&& jQuery.isFunction(oBinding.getPath)
			&& oBinding.getPath()
		) {
			aBindings.push(oBinding);
		}

		return aBindings;
	}
function flattenBindings(oBinding, oParentDefaultModel) {
		var aBindings = [];
		var sModelName = oBinding.getMetadata().getName();

		if (sModelName === "sap.ui.model.CompositeBinding") {
			oBinding.getBindings().forEach(function (oBinding) {
				aBindings = aBindings.concat(flattenBindings(oBinding, oParentDefaultModel));
			});
		} else if (
			(
				sModelName === "sap.ui.model.odata.ODataPropertyBinding"
				|| sModelName === "sap.ui.model.odata.v2.ODataPropertyBinding"
				|| sModelName === "sap.ui.model.odata.v4.ODataPropertyBinding"
				|| sModelName === "sap.ui.model.json.JSONPropertyBinding"
				|| sModelName === "sap.ui.model.json.XMLPropertyBinding"
				|| sModelName === "sap.ui.model.resource.ResourcePropertyBinding"
			)
			&& oBinding.getModel() === oParentDefaultModel
			&& oBinding.isRelative()
			&& jQuery.isFunction(oBinding.getPath)
			&& oBinding.getPath()
		) {
			aBindings.push(oBinding);
		}

		return aBindings;
	}
function flattenBindings ( oBinding , oParentDefaultModel ) { var aBindings = [ ] ; var sModelName = oBinding . getMetadata ( ) . getName ( ) ; if ( sModelName === "sap.ui.model.CompositeBinding" ) { oBinding . getBindings ( ) . forEach ( function ( oBinding ) { aBindings = aBindings . concat ( flattenBindings ( oBinding , oParentDefaultModel ) ) ; } ) ; } else if ( ( sModelName === "sap.ui.model.odata.ODataPropertyBinding" || sModelName === "sap.ui.model.odata.v2.ODataPropertyBinding" || sModelName === "sap.ui.model.odata.v4.ODataPropertyBinding" || sModelName === "sap.ui.model.json.JSONPropertyBinding" || sModelName === "sap.ui.model.json.XMLPropertyBinding" || sModelName === "sap.ui.model.resource.ResourcePropertyBinding" ) && oBinding . getModel ( ) === oParentDefaultModel && oBinding . isRelative ( ) && jQuery . isFunction ( oBinding . getPath ) && oBinding . getPath ( ) ) { aBindings . push ( oBinding ) ; } return aBindings ; }
Fetches all bindings for a specified binding model

@param {sap.ui.model.PropertyBinding} oBinding - Binding model to get paths from
@param {sap.ui.model.odata.XX.ODataModel} oParentDefaultModel - Data model (XX = '', v2, v4...)

@returns {Array} - Returns a flattened array of found bindings

@private
Fetches all bindings for a specified binding model