Add more wrapper methods to JavaClassifierType.
Inline the utility method adjustTypeUsageWithMutabilityAnnotations to the two
places where it was used. Also add JavaAnnotationOwner and change signature of
JavaAnnotationResolver to take JavaAnnotationOwner, not PSI
JavaClassifier is a common type for JavaClass and JavaTypeParameter. In almost
all of the places JavaClass remains to be JavaClass, except for the resolution
result of JavaClassType, which can be a type parameter. Add an assertion that
JavaClass is created only for a class and not for a type parameter. Delete
different creations of JavaClass in 'idea' (where there can be a type
parameter) by changing the interface of util functions.
Delete JavaModifierListOwnerImpl, extract its methods into JavaElementUtil and
use these implementations for every JavaModifierListOwner
Continue refactoring JavaTypeTransformer to work with JavaType, not PsiType
Use an instanceof-chain on a JavaType instance instead of PsiTypeVisitor in
TypeTransformer. Add a special method to handle vararg types, use it in
ValueParameterResolver
Use JavaType instead of PsiType whenever possible.
In this commit the logic of checking whether a loaded parameter is a vararg
changed: instead of checking if the corresponding PsiType is PsiEllipsisType we
now check if the containing method has the ACC_VARARG modifier
Several places are still left and need special handling. The overall behavior
of the resolver should not change in this commit (except for maybe different
small operations like creating names, fq-names, ...)
There were two usages of RuntimeHandleClassesMode.REPORT_ERROR: first in tests,
where it never occurred, second in JavaClassResolver, where it's now inlined
HACK: determine whether fqname is a name for class contained in class or namespace based on virtual file name
This commit introduces code duplication which is hard to avoid without major refactoring
And its two subclasses. Replace it by package-local MembersProvider, which is
used only in java scopes, and two factory methods (for package & for class)
- simplify hierarchy, now there's only two kinds of providers: for packages and
for classes
- remove getters from providers and thus almost get rid of dependencies on them
from the outside resolver (the only usages left are those that call
getMembersCache)
Almost in all places only JavaDescriptorResolver was needed. The only exception
is JavaPackageScope which needs PsiClassFinder, that is now passed as a
constructor argument.
Also merge JavaPackageScopeWithoutMembers into its superclass JavaPackageScope
- delete InjectorForJavaSemanticServices, replace its usages with
InjectorForJavaDescriptorResolver
- delete unneeded fields and parameters of InjectorForJavaDescriptorResolver
Delete org.jetbrains.jet.rt.signature and jet.typeinfo packages from runtime,
refactor BothSignatureWriter so that it now writes only java generic signature
and saves parameter types and kinds
Class object properties' backing fields are generated into static fields of the
containing class, not into fields of class object. For fields we now store the
flag which, if set, tells that this field should be looked for in the
containing class
Delete unused constants
Move constants related to abi to JvmAbi class
Constants related to annotation names are now in JvmAnnotationNames
Remove old annotation classes
Deprecate JetClass and JetPackageClass name constants