Commit Graph

205 Commits

Author SHA1 Message Date
Alexander Udalov 2a5b4d2c83 Fix annotations on Java elements in reflection
#KT-10840 Fixed
2016-01-28 21:48:16 +03:00
Michael Bogdanov 829978a37d Added additional parameter for default methods 2016-01-22 10:10:32 +03:00
Alexander Udalov 9620893fa4 Drop synthetic class kind Function, drop Metadata#xi 2016-01-19 18:39:59 +03:00
Alexander Udalov a4daa08e5c Write module name as proto extension instead of another annotation argument 2016-01-19 18:39:59 +03:00
Alexander Udalov 7906ac63b5 Read Metadata annotation, support option to ignore old annotations 2016-01-19 18:39:59 +03:00
Dmitry Jemerov 3870bd04b8 core: cleanup 'public', property access syntax 2016-01-07 18:03:09 +01:00
Alexander Udalov 890c961383 Fix reflection internal error on enum nested classes query
#KT-10520 Fixed
2015-12-28 16:40:34 +03:00
Alexander Udalov 3513a64351 Move utilities about companion property fields to JvmAbi
To reuse that logic in reflection
2015-12-25 20:16:18 +03:00
Alexander Udalov dc6a176282 Drop old JVM binary format extensions: static in outer, impl class name 2015-12-25 20:16:18 +03:00
Alexander Udalov 03606c13aa Introduce PackagePartSource to store part class name in deserialized descriptors
Not used at the moment, will be in the following commits
2015-12-23 16:45:26 +03:00
Alexander Udalov a9476dfe37 Replace 'kotlin-runtime' in module dependencies with 'util' 2015-12-21 18:46:08 +03:00
Alexander Udalov dc84445e2e Inherit KProperty interfaces from function types
To be able to write the following: listOfStrings.map(String::length)
2015-12-16 19:48:28 +03:00
Ilya Gorbunov 5aff07561d Move jvm annotations and class mapping intrinsics to runtime.jvm module to kotlin.jvm package.
Make annotationClass to be a property.
Deprecate with error javaClass property on KClass<T>
2015-12-14 03:51:07 +03:00
Dmitry Jemerov e97e82d119 use terms "lambda expression" and "anonymous function" instead of "function literal" and "function expression" 2015-12-09 13:55:40 +01:00
Alexander Udalov 9a01c0d9cb Test that no delegated properties are used in critical classes in reflection 2015-12-08 22:59:00 +03:00
Alexander Udalov 8594cfca46 Remove kotlin.jvm.internal.KotlinPackage and corresponding code 2015-11-27 21:22:04 +03:00
Alexander Udalov ad6888dac6 Drop KPackage and deprecated stuff from Reflection/ReflectionFactory 2015-11-27 21:22:04 +03:00
Alexander Udalov 6367e5e133 Fix deadlock on static initializers of KProperty implementations
#KT-10041 Fixed
2015-11-19 02:57:27 +03:00
Alexander Udalov 596a74d288 Code cleanup in reflection.jvm, generator scripts 2015-11-09 22:24:41 +03:00
Alexander Udalov 1576160390 Improve implementation of callable reference superclasses
Previously to use reflection on them, you had to wrap an already created object
with a "Reflection.function" or "Reflection.propertyN" call, which the JVM
back-end was doing. This was not optimal in several senses and current solution
fixes that
2015-11-09 22:24:40 +03:00
Alexander Udalov 7d32524754 Do not fail with type cast when not needed in reflection.jvm 2015-11-09 22:24:40 +03:00
Alexander Udalov baa28de865 Add factory methods to create class references with internal names
Will be used in future versions to support references to mapped mutable
collections
2015-11-09 22:24:39 +03:00
Stanislav Erokhin 2c3f58eeb7 Renamed methods in MemberScope from getSmth to getContributedSmth 2015-11-05 14:34:00 +03:00
Stanislav Erokhin 6f9d9759ce Renamed KtScope to MemberScope 2015-11-05 14:34:00 +03:00
Stanislav Erokhin 0b5de434fa Removed usages KtScope.getAllDescriptors 2015-11-04 12:41:34 +03:00
Dmitry Jemerov 736b496f6a drop deprecated @platformName and @platformStatic annotations 2015-11-02 17:00:44 +01:00
Mikhail Glukhikh f8a70302ac Cleanup: get rid of effective visibility warnings 2015-10-28 14:31:51 +03:00
Alexander Udalov b8b98b4eaa Support get/set on KProperty objects for delegated properties 2015-10-26 21:02:35 +03:00
Alexander Udalov f2a37b4150 Minor, move KProperty for property references to separate file 2015-10-26 21:02:35 +03:00
Dmitry Jemerov d6a3870101 rename Kt to Kotlin in KtType, KtIcons 2015-10-20 16:23:31 +02:00
Dmitry Jemerov 49033e0002 rename Jet* classes to Kt* 2015-10-19 21:35:30 +02:00
Alexander Udalov a501878d60 Workaround circular dependency of KProperty1 and KClassImpl
This appeared after introduction of KProperty in delegated property convention
methods. If a KProperty1 instance is created while constructing a KClassImpl
instance before assigning the 'jClass' field, an NPE is thrown because the
constructor of that KProperty1 instance tries to lookup the declaring class of
the property, which in some case happens to be the exact KClassImpl we're
constructing. No test added because I was not able to reproduce the behavior in
an isolated environment
2015-10-19 15:20:20 +03:00
Alexander Udalov 82d2e623d3 Support a more optimized way of storing types in metadata
Together with almost every type now there's also an id which references a type
from a separate table. Storing such ids instead of Type messages will allow to
reduce the size of the metadata for files where types are used many times over
and over again. Currently only deserialization of such types is supported,
along with the former mechanism
2015-10-15 18:25:39 +03:00
Dmitry Petrov 8cd624a58a Drop package facades: code cleanup in Kotlin project. 2015-10-15 10:33:47 +03:00
Alexander Udalov 3c74f48f91 Pass KProperty instances to property delegates
Inherit KProperty from PropertyMetadata, cache corresponding KProperty objects
instead of PropertyMetadataImpl objects, add support for properties with 2
receivers
2015-10-14 20:45:24 +03:00
Andrey Breslav 8e7f6f3c8c Migrated from @HiddenDeclaration to @Deprecated(..., level = DeprecationLevel.HIDDEN) 2015-10-13 13:50:16 +03:00
Alexander Udalov 5f18cb8703 Rename files in reflection.jvm
Move KDeclarationContainer.functions to KClasses and make it accept only
KClass, since KPackage is deprecated anyway
2015-10-13 11:58:45 +03:00
Michael Bogdanov a09c8105c4 Support reflection on top level properties 2015-10-13 11:14:33 +03:00
Michael Bogdanov e8f9a9f3b8 Support reflection on @JvmField properties inside class companion 2015-10-13 11:14:32 +03:00
Michael Bogdanov f4b7913dd3 sanitizeAsJavaIdentifier function moved to JvmAbi 2015-10-13 11:14:32 +03:00
Michael Bogdanov b713328540 Fix reflection for internal properties without getter/setter 2015-10-13 10:50:10 +03:00
Alexander Udalov 9d626ef1d9 Rename KotlinCallable annotation to KotlinFunction 2015-10-11 17:10:40 +03:00
Alexander Udalov 9e4823ef82 Write module name to metadata, fix reflection for file facades
Module name will be used for proper introspection of internal members
2015-10-11 17:10:37 +03:00
Alexander Udalov 0218e0351b Deprecate KPackage, to be removed later 2015-10-11 17:10:37 +03:00
Alexander Udalov 37c36f806a Rename foreignKotlinClass -> getOrCreateKotlinClass
Previously this cache contained only Java (hence 'foreign') classes, that is
not the case anymore
2015-10-11 17:10:35 +03:00
Alexander Udalov fe737886cd Drop deprecated K*Function interfaces 2015-10-11 17:10:34 +03:00
Alexander Udalov 934ffed944 Don't write field signatures when not necessary 2015-10-11 17:10:30 +03:00
Alexander Udalov 864926ee2e Don't always write JVM method signatures to metadata
When the trivial type mapping (implemented in JvmProtoBufUtil) from
ProtoBuf.Type instances works fine, don't write the signature since it can be
loaded by exactly the same trivial type mapping
2015-10-11 17:10:30 +03:00
Alexander Udalov 9bf0502a31 Load new proto messages for functions and properties 2015-10-11 17:10:24 +03:00
Denis Zharkov ad68378836 Support loading methods from Java as common properties overrides 2015-10-10 12:29:14 +03:00