You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/11/06 00:15:04 UTC

[groovy-website] branch asf-site updated: formatting

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 77ca7e1  formatting
77ca7e1 is described below

commit 77ca7e16307e815855a58a145fe1644a8ff4bcf9
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Nov 6 10:14:52 2019 +1000

    formatting
---
 site/src/site/wiki/GEP-12.adoc | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/site/src/site/wiki/GEP-12.adoc b/site/src/site/wiki/GEP-12.adoc
index bdde374..1009893 100644
--- a/site/src/site/wiki/GEP-12.adoc
+++ b/site/src/site/wiki/GEP-12.adoc
@@ -17,9 +17,16 @@
 
 == Abstract: SAM coercion
 
-SAM stands for Single Abstract Method.  SAM coercion is here a Groovy style transformation of a
+SAM stands for Single Abstract Method.
+A SAM type is an abstract class or interface with a single abstract method.
+SAM coercion involves transforming a
 `groovy.lang.Closure` instance into an object suitable for our SAM type.
-A SAM type is an abstract class or interface with a single abstract method. The coercion can happen as part of an assignment or as the result of a method call. Since this transformation might be outside of the types provided by Closure itself, it can be more than a simple Java style cast. Closure becomes a kind of sub type to all SAM types. Groovy has other such transformations without explicit cast or asType usage, which are number object transformations as well as the conversion of GSt [...]
+The coercion can happen as part of an assignment or as the result of a method call.
+Since this transformation might be outside of the types provided by Closure itself,
+it can be more than a simple Java style cast.
+Closure becomes a kind of sub type to all SAM types.
+Groovy has other such transformations without explicit cast or asType usage,
+which are number object transformations as well as the conversion of GString to String.
 
 === Motivation
 Even before Java8 we had discussions about supporting different interfaces with Closure like Runnable and Callable.