Alexander Udalov
1a618deeab
Use descriptors for reflection on top level properties
...
This also allows to obtain a Field object from the package part (see
mapping.kt)
2015-03-11 16:42:33 +03:00
Alexander Udalov
64fdb18ad3
Use descriptors for reflection on class properties
...
- use ConcurrentHashMap as a cache of class loaders to module descriptors
- KClassImpl now has a lazy class descriptor and it manages property creation
by looking (also lazily) for the property descriptor in the corresponding
scope
- since deserialized descriptors have full information about where a JVM symbol
is located and what signature it has, new tests will begin to pass where
Kotlin model and Java reflection model differ, see classObjectVar.kt
2015-03-11 16:42:31 +03:00
Alexander Udalov
a8046020fb
Rename kotlin.reflect.IllegalAccessException -> IllegalPropertyAccessException
...
The former name clashes with java.lang.IllegalAccessException and proved to be
inconvenient because it should always be qualified in the source.
Also use java.lang exception's message as kotlin.reflect exception's message
2015-03-07 02:32:15 +03:00
Pavel V. Talanov
59f192ef90
Replace 'class object' with 'default object' in renderers and test data
...
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Michael Bogdanov
6eaa6201f0
Test for obsolete KT-6020: Type inference failed on property reference of generic class
...
#KT-6020 Can't Reproduce
2014-10-21 09:47:17 +04:00
Alexander Udalov
36f7cc742f
Introduce NoSuchPropertyException and IllegalAccessException
...
No new tests added because it's difficult to model a situation where a
::-access is allowed but the code throws these exceptions at runtime
2014-07-02 01:58:22 +04:00
Alexander Udalov
a38a396a43
Remove default import "kotlin.reflect"
...
Basic reflection is usable without any imports (with :: literals)
This reverts commit 9503056dd5 .
2014-07-02 01:55:53 +04:00
Alexander Udalov
89d6f25fb6
Fix initialization order of KClass field and class object fields
2014-07-02 01:26:21 +04:00
Alexander Udalov
e7f19c531a
Support 'accessible' for reflected properties on JVM
...
Calls Java reflection's isAccessible/setAccessible
2014-07-02 01:26:20 +04:00
Alexander Udalov
1275c84f92
Fail with IllegalAccessException on :: reference to private property
...
Instead of mysterious NoSuchMethodException
2014-07-02 01:26:20 +04:00
Alexander Udalov
5ab83aad8a
Support references to extension properties in JVM codegen
...
#KT-1183 In Progress
2014-07-02 01:26:19 +04:00
Alexander Udalov
461cce103b
Support references to top level and member properties in JVM codegen
...
#KT-1183 In Progress
2014-07-02 01:26:19 +04:00