지식쌓기/개발-Android

SAM Conversion

은순냥 2020. 2. 11. 10:18
반응형

SAM-Conversion이란?

This is possible when the required type is an interface or abstract class with a Single (exactly one) Abstract Methods. Such a class is sometypes called a SAM-type, and the conversion from a lambda expression to an anonymous class is sometimes called SAM-conversion.

http://www.gnu.org/software/kawa/Anonymous-classes.html

 

Kawa: Anonymous classes

Syntax: object (supers ...) field-or-method-decl ... Lambda as shorthand for anonymous class An anonymous class is commonly used in the Java platform where a function language would use a lambda expression. Examples are call-back handlers, events handlers,

www.gnu.org

 

반응형

'지식쌓기 > 개발-Android' 카테고리의 다른 글

kotlin @JvmField  (0) 2020.02.11
kotlin - android - 여러 layout 에서 id 얻어오기  (0) 2020.02.11
kotlin - View 확장 class 생성자  (0) 2020.02.07
deprecated 된다네  (0) 2019.11.12
apk - 업로드키, 앱사인키  (0) 2019.08.01