protected XAbstractFeatureCall createSarlCapacityExtensionProvider ( JvmIdentifiableElement thisFeature , JvmField field ) { // For capacity call redirection if ( thisFeature instanceof JvmDeclaredType ) { final JvmAnnotationReference capacityAnnotation = this . annotationLookup . findAnnotation ( field , ImportedCapacityFeature . class ) ; if ( capacityAnnotation != null ) { final String methodName = Utils . createNameForHiddenCapacityImplementationCallingMethodFromFieldName ( field . getSimpleName ( ) ) ; final JvmOperation callerOperation = findOperation ( ( JvmDeclaredType ) thisFeature , methodName ) ; if ( callerOperation != null ) { final XbaseFactory baseFactory = getXbaseFactory ( ) ; final XMemberFeatureCall extensionProvider = baseFactory . createXMemberFeatureCall ( ) ; extensionProvider . setFeature ( callerOperation ) ; final XFeatureCall thisAccess = baseFactory . createXFeatureCall ( ) ; thisAccess . setFeature ( thisFeature ) ; extensionProvider . setMemberCallTarget ( thisAccess ) ; return extensionProvider ; } } } return null ; }
Create the extension provider dedicated to the access to the used capacity functions .