Submit Search
Upload
프...프로퍼티
•
0 likes
•
204 views
Pluu love
Follow
Kotlin Study 2주차 발표자료
Read less
Read more
Technology
Report
Share
Report
Share
1 of 13
Download now
Download to read offline
Recommended
[IT기술칼럼 #4] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
[IT기술칼럼 #4] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
탑크리에듀(구로디지털단지역3번출구 2분거리)
[IT기술칼럼#2] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
[IT기술칼럼#2] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
탑크리에듀(구로디지털단지역3번출구 2분거리)
나의 공부와 수집
나의 공부와 수집
Pluu love
KotlinJS Practice : Chrome API - TwiceRound Project #002
KotlinJS Practice : Chrome API - TwiceRound Project #002
Lee WonJae
Android Development
Android Development
Pluu love
Tax regulations in USA affecting NRI's - 2013
Tax regulations in USA affecting NRI's - 2013
NS Global
KotlinJS Overview - TwiceRound #001
KotlinJS Overview - TwiceRound #001
Lee WonJae
Amazon Redshift의 이해와 활용 (김용우) - AWS DB Day
Amazon Redshift의 이해와 활용 (김용우) - AWS DB Day
Amazon Web Services Korea
Recommended
[IT기술칼럼 #4] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
[IT기술칼럼 #4] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
탑크리에듀(구로디지털단지역3번출구 2분거리)
[IT기술칼럼#2] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
[IT기술칼럼#2] 고급자바스크립트 for AngularJS, React_고급자바스크립트,AngularJS,React전문교육학원
탑크리에듀(구로디지털단지역3번출구 2분거리)
나의 공부와 수집
나의 공부와 수집
Pluu love
KotlinJS Practice : Chrome API - TwiceRound Project #002
KotlinJS Practice : Chrome API - TwiceRound Project #002
Lee WonJae
Android Development
Android Development
Pluu love
Tax regulations in USA affecting NRI's - 2013
Tax regulations in USA affecting NRI's - 2013
NS Global
KotlinJS Overview - TwiceRound #001
KotlinJS Overview - TwiceRound #001
Lee WonJae
Amazon Redshift의 이해와 활용 (김용우) - AWS DB Day
Amazon Redshift의 이해와 활용 (김용우) - AWS DB Day
Amazon Web Services Korea
[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기
Sang Heon Lee
Domain Specific Languages With Groovy
Domain Specific Languages With Groovy
Tommy C. Kang
[WELC] 22. I Need to Change a Monster Method and I Can’t Write Tests for It
[WELC] 22. I Need to Change a Monster Method and I Can’t Write Tests for It
종빈 오
[143] Modern C++ 무조건 써야 해?
[143] Modern C++ 무조건 써야 해?
NAVER D2
Scalability
Scalability
Dongwook Lee
Scala, Scalability
Scala, Scalability
Dongwook Lee
Linq
Linq
Ki Won Kim
불어오는 변화의 바람, From c++98 to c++11, 14
불어오는 변화의 바람, From c++98 to c++11, 14
명신 김
More Related Content
Similar to 프...프로퍼티
[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기
Sang Heon Lee
Domain Specific Languages With Groovy
Domain Specific Languages With Groovy
Tommy C. Kang
[WELC] 22. I Need to Change a Monster Method and I Can’t Write Tests for It
[WELC] 22. I Need to Change a Monster Method and I Can’t Write Tests for It
종빈 오
[143] Modern C++ 무조건 써야 해?
[143] Modern C++ 무조건 써야 해?
NAVER D2
Scalability
Scalability
Dongwook Lee
Scala, Scalability
Scala, Scalability
Dongwook Lee
Linq
Linq
Ki Won Kim
불어오는 변화의 바람, From c++98 to c++11, 14
불어오는 변화의 바람, From c++98 to c++11, 14
명신 김
Similar to 프...프로퍼티
(8)
[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기
Domain Specific Languages With Groovy
Domain Specific Languages With Groovy
[WELC] 22. I Need to Change a Monster Method and I Can’t Write Tests for It
[WELC] 22. I Need to Change a Monster Method and I Can’t Write Tests for It
[143] Modern C++ 무조건 써야 해?
[143] Modern C++ 무조건 써야 해?
Scalability
Scalability
Scala, Scalability
Scala, Scalability
Linq
Linq
불어오는 변화의 바람, From c++98 to c++11, 14
불어오는 변화의 바람, From c++98 to c++11, 14
프...프로퍼티
1.
Property Pluu
2.
Kotlin에는 Field가 없다 그렇다고 하네요
3.
Grammar property (used by
memberDeclaration, declaration, topLevelObject) : modifiers ("val" | "var") typeParameters? (type ".")? (multipleVariableDeclarations | variableDeclarationEntry) typeConstraints ("by" | "=" expression SEMI?)? (getter? setter? | setter? getter?) SEMI? https://kotlinlang.org/docs/reference/grammar.html#property
4.
어려우니… 쉬운걸 봅시다
5.
Grammar var <propertyName>[: <PropertyType>]
[= <property_initializer>] [<getter>] [<setter>] https://kotlinlang.org/docs/reference/properties.html
6.
Options … ... ●
<property_initializer> ● <getter> ………………………………………………. Default Getter ● <setter> ………………………………………………. Default Setter ● <PropertyType> ○ 추론이 가능한 경우 생략 가능 ○ 초기화 값을 통해 ○ Kotlin 1.1, getter에서 추론되는 경우 생략 가능
7.
프로퍼티가 해주는 것 ●
Filed와 Accessor 자동 생성 ● Property Accessor 를 Accessor 호출로 변환 ● lombok과 비슷 ○ 직접 접근하지만 암묵적으로 Accessor를 경우해서 호출
8.
Backing ??? 사실… 잘
모르겠어요
9.
Accessor Product().id class Product { var
id = 0 get() = field / 10 set(value) { field = value * 10 } } Accessor
10.
Backing Field var counter
= 0 get() = field set(value) { if (value >= 0) counter = value } StackOverFlow
11.
Backing Field var counter
= 0 get() = field set(value) { if (value >= 0) field = value }
12.
Backing Property private var
_table: Map<String, Int>? = null public val table: Map<String, Int> get() { if (_table == null) { _table = HashMap() } return _table ?: throw AssertionError("Set to null by another thread") }
13.
끝!
Download now