Commit Graph

26 Commits

Author SHA1 Message Date
Alexander Udalov
2de7f38427 Migrate boxWithJava tests to multi-file framework 2016-03-02 15:47:38 +03:00
Alexander Udalov
2a5b4d2c83 Fix annotations on Java elements in reflection
#KT-10840 Fixed
2016-01-28 21:48:16 +03:00
Ilya Gorbunov
d49f5b95b0 Fix deprecations in testData 2016-01-27 19:05:19 +03:00
Ilya Gorbunov
25c4453dc5 Cleanup deprecated symbol usages in testData 2016-01-22 05:54:38 +03:00
Ilya Gorbunov
f4822cd757 Fix testData in compiler: add collections and ranges package to fq-names. 2016-01-22 05:54:38 +03:00
Sergey Mashkov
e25d31618c Fix tests 2015-12-18 22:16:04 +03:00
Yan Zhulanow
9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Ilya Gorbunov
43a74e575e Fix testData/codegen: replace deprecated sort usages. 2015-10-07 22:36:43 +03:00
Alexander Udalov
a1097f7081 Add val KClass.staticProperties: Collection<KProperty0<*>>
To get static fields from Java classes
2015-08-29 18:37:41 +03:00
Alexander Udalov
94d45f35d4 Support KClass.nestedClasses 2015-08-29 17:59:45 +03:00
Alexander Udalov
a73d02418d Introduce additional API for introspecting functions
memberFunctions, declaredMemberFunctions, staticFunctions, etc.

 #KT-8797 Fixed
2015-08-28 21:11:21 +03:00
Alexander Udalov
ebe4a8ec89 Provide equals/hashCode/toString for KType implementation 2015-08-28 21:11:20 +03:00
Alexander Udalov
7dcb690254 Additional tests on reflection calls 2015-08-24 01:29:58 +03:00
Alexander Udalov
d3e39812cb Support mapping of KType to j.l.reflect.Type 2015-08-07 00:55:35 +03:00
Alexander Udalov
9c522b4d49 Refactor property calls in reflection, fix some corner cases
- compute a FunctionCaller instance for getter and setter so that "call" only
  delegates to that FunctionCaller's "call", in the same way it's done in
  KFunctionImpl
- use RuntimeTypeMapper.mapPropertySignature to get the exact origin and
  signature of a property and its accessors. This makes unwrapFakeOverride call
  unnecessary and also fixes some cases like private Java fields
- temporarily drop custom range checks, will be re-added soon
2015-08-07 00:55:30 +03:00
Alexander Udalov
d1e67805fc Fix supertypes for reflected Java classes, always include j.l.Object
equals/hashCode/toString had not appeared in Java classes' "members" because of
this
2015-08-03 23:06:15 +03:00
Alexander Udalov
8f0885ca03 Rename KClass.properties and extensionProperties: prepend 'member'
To better emphasize the fact that all returned properties require an instance
of the class they are declared in. Another issue was that
'Some::class.extensionProperties' was sometimes incorrectly perceived as
"get all extension properties available on the class Some"
2015-07-29 21:36:47 +03:00
Alexander Udalov
50dbda1e1a Introduce KClass.members, make properties/extensionProperties extensions
To avoid significant growth of KClass and KPackage interfaces
2015-07-29 21:36:36 +03:00
Alexander Udalov
2492977274 Additional tests on reflection for Java methods 2015-07-29 21:36:35 +03:00
Alexander Udalov
3b2be6212d Add some tests on Java property references 2015-07-10 20:10:13 +03:00
Alexander Udalov
30794060a9 Simplify property hierarchy in reflection
Leave only 3*2 = 6 classes: KProperty0, KProperty1, KProperty2 and their
mutable analogs, depending on the number of receivers a property takes
2015-07-10 20:10:09 +03:00
Alexander Udalov
c3b97e0668 Simplify function hierarchy in reflection
Get rid of all classes except kotlin.reflect.KFunction, which will be used to
represent all kinds of simple functions.

Lots of changes to test data are related to the fact that KFunction is not an
extension function (as opposed to KMemberFunction and KExtensionFunction who
were) and so a member or an extension function reference now requires all
arguments be passed to it in the parentheses, including receivers. This is
probably temporary until we support calling any function both as a free
function and as an extension. In JS, functions and extension functions are not
interchangeable, so tests on this behavior are removed until this is supported
2015-07-10 20:10:08 +03:00
Alexander Udalov
6ae7ed1cc4 Add some new tests on functions and extension functions 2015-05-27 01:44:19 +03:00
Alexander Udalov
4cea9ecca4 Minor, add reflection test on inherited Java property 2015-04-02 03:22:12 +03:00
Alexander Udalov
d3abd54b06 Add 'val KClass.declaredProperties', make getProperties a property 2015-03-17 23:39:13 +03:00
Alexander Udalov
b3cdd818f0 Support member extension properties, implement KClass.getExtensionProperties()
#KT-6570 Fixed
2015-03-11 16:42:38 +03:00