inflearn logo
강의

Course

Instructor

Yoon Jae-seong's Google's official language, Kotlin, for getting started with programming

Lesson 34 Reflection

34강 리플렉션강의중에서

462

shafeel2

67 asked

0

class TestClass() {
constructor(a:Int) : this() {

}
constructor(a:Int, b: Int) : this() {

}
fun testMethod() {

}

}

fun main(){
val t1 : TestClass = TestClass()
println("추상클래스인지아닌지: ${t1::class.isAbstract}") // 변수명: company_name
}

android kotlin

Answer 3

0

softcampus

implementation "org.jetbrains.kotlin:kotlin-reflect:최신버전"

형태로 라이브러리 추가해보세용


0

shafeel2

참고로 저는 Intellij 로 코딩연습하고 있습니다

0

shafeel2

위코드를 실행하면 아래와 같은 에러가 발생합니다

Exception in thread "main" kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath

at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:88)

at kotlin.jvm.internal.ClassReference.isAbstract(ClassReference.kt:62)

at MainKt.main(Main.kt:16)

at MainKt.main(Main.kt)

sealed class 관련 code 내 when 에서 오류가 발생합니다

0

338

2

t1.getA1()); cannot find symbol method getA1()

0

426

4

생성자에서 다른생성자를 호출하는 this 의 예

0

505

1

IntelliJ IDEA 2023.1.3 (Community Edition) 이

0

447

1

new 모듈 창에서 Kotlin을 선택할 수 있는 옵션이 없습니다.

0

866

3

생성자와 상속에 관해 질문입니다

0

248

1

it

0

157

1

주생성자

0

321

1

형변환

0

237

1

모듈 임포트

0

254

1

Overriding 강의에서 궁금한 게 생겨서 질문드립니다.

0

193

0

Java 함수형 프로그래밍 방식 관련해 궁금한점이 있어 문의드립니다!

0

189

1

안녕하세요

0

203

0

강의 중 언급하시는 '매개체'의 의미가 궁금합니다.

0

258

1

배열 함수 중 .max() 와 .min() 사용 시 오류가 발생됩니다. 해결 방안을 알고 싶습니다.

0

787

1

package 선언 후 println 참조 못함

0

271

1

자바메인에서 가져오는 게 안됩니다.

1

291

2

모듈 임포트가 안돼요.

1

305

2

아이맥에서 자바 다운하고 설치하는 방법도 알려주세요~^^

0

268

2

33강 Sealed 클래스

0

174

1

모듈 사용 등록

0

339

1

인틀리제이 업데이트 관련

0

157

1

안녕하세요 초보자라서 그런지 혼란이옵니다

2

157

1

리플렉션에서 out에 대한 질문

0

198

1