protected void jvmOperationCallToJavaExpression ( final XExpression sourceObject , final JvmOperation operation , XExpression receiver , List < XExpression > arguments , ITreeAppendable appendable ) { String name = null ; assert operation != null ; if ( appendable . hasName ( operation ) ) { name = appendable . getName ( operation ) ; } else { name = this . featureNameProvider . getSimpleName ( operation ) ; } if ( name == null ) { name = "/* name is null */" ; //$NON-NLS-1$ } if ( operation . isStatic ( ) ) { final JvmDeclaredType operationContainer = operation . getDeclaringType ( ) ; final JvmIdentifiableElement container = getLogicalContainerProvider ( ) . getNearestLogicalContainer ( sourceObject ) ; final JvmType containerType = EcoreUtil2 . getContainerOfType ( container , JvmType . class ) ; final LightweightTypeReference reference = newTypeReferenceOwner ( sourceObject ) . toLightweightTypeReference ( operationContainer ) ; if ( ! reference . isAssignableFrom ( containerType ) ) { appendable . append ( operationContainer ) ; appendable . append ( "." ) ; //$NON-NLS-1$ } } else if ( receiver != null ) { internalToJavaExpression ( receiver , appendable ) ; appendable . append ( "." ) ; //$NON-NLS-1$ } else { appendable . append ( "this." ) ; //$NON-NLS-1$ } appendable . trace ( sourceObject , XbasePackage . Literals . XABSTRACT_FEATURE_CALL__FEATURE , 0 ) . append ( name ) ; appendable . append ( "(" ) ; //$NON-NLS-1$ if ( arguments != null && ! arguments . isEmpty ( ) ) { appendArguments ( arguments , appendable , true ) ; } appendable . append ( ")" ) ; //$NON-NLS-1$ }
Generate the Java expression for the given JVM operation .