Converted TipsManager to Kotlin

This commit is contained in:
Valentin Kipyatkov
2014-09-17 14:11:33 +04:00
committed by valentin
parent 34aada75eb
commit 726f49b3f8
7 changed files with 145 additions and 223 deletions
@@ -44,6 +44,7 @@ public class AutoCastUtils {
private AutoCastUtils() {}
@NotNull
public static List<JetType> getAutoCastVariants(
@NotNull ReceiverValue receiverToCast,
@NotNull ResolutionContext context
@@ -51,6 +52,7 @@ public class AutoCastUtils {
return getAutoCastVariants(receiverToCast, context.trace.getBindingContext(), context.dataFlowInfo);
}
@NotNull
public static List<JetType> getAutoCastVariants(
@NotNull ReceiverValue receiverToCast,
@NotNull BindingContext bindingContext,
@@ -36,6 +36,7 @@ import java.util.Set;
public final class JetScopeUtils {
private JetScopeUtils() {}
@NotNull
public static List<ReceiverValue> getImplicitReceiversHierarchyValues(@NotNull JetScope scope) {
Collection<ReceiverParameterDescriptor> hierarchy = scope.getImplicitReceiversHierarchy();
@@ -56,6 +57,7 @@ public final class JetScopeUtils {
* @param scope Scope for query extensions.
* @return extension descriptors.
*/
@NotNull
public static Collection<CallableDescriptor> getAllExtensions(@NotNull JetScope scope) {
Set<CallableDescriptor> result = Sets.newHashSet();
@@ -37,19 +37,19 @@ import kotlin.properties.Delegates
public trait Qualifier {
val expression: JetExpression
public val expression: JetExpression
val packageView: PackageViewDescriptor?
public val packageView: PackageViewDescriptor?
val classifier: ClassifierDescriptor?
public val classifier: ClassifierDescriptor?
val name: Name
public val name: Name
get() = classifier?.getName() ?: packageView!!.getName()
// package, classifier or class object descriptor
val resultingDescriptor: DeclarationDescriptor
public val resultingDescriptor: DeclarationDescriptor
val scope: JetScope
public val scope: JetScope
}
class QualifierReceiver (