Kotlin 플러그인 All-open 파헤치기 (feat, JPA Fetch)
All-open 코틀린의 클래스와 메소드들은 기본적으로 final 입니다.예를 들어 아래와 같은 Parent 클래스가 있다고 하면class Parent { fun hello() = "hello world!"} 이제 Parent 클래스를 상속하지 못합니다. 말 그대로 final 이기 때문에 건드릴 수 없죠 클래스를 open 시켜준다고 한들open class Parent { fun hello() = "hello world!"} 마찬가지입니다. 따라서 아래와 같이 모두 open 키워드를 달아주어야 상속하거나 오버라이드 할 수 있습니다.open class Parent { open fun hello() = "hello world!"} all-open 플러그인은 사전에 정해둔 어노테이션을 클래..
2024.05.18