getCompleteTypeInfo(), getCompleteNullabilityInfo() and getId() made public
This commit is contained in:
@@ -17,15 +17,23 @@
|
|||||||
package org.jetbrains.jet.lang.resolve.calls.autocasts;
|
package org.jetbrains.jet.lang.resolve.calls.autocasts;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import com.google.common.collect.SetMultimap;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.jet.lang.types.JetType;
|
import org.jetbrains.jet.lang.types.JetType;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public interface DataFlowInfo {
|
public interface DataFlowInfo {
|
||||||
DataFlowInfo EMPTY = new DelegatingDataFlowInfo(null, ImmutableMap.<DataFlowValue, Nullability>of(),
|
DataFlowInfo EMPTY = new DelegatingDataFlowInfo(null, ImmutableMap.<DataFlowValue, Nullability>of(),
|
||||||
DelegatingDataFlowInfo.newTypeInfo());
|
DelegatingDataFlowInfo.newTypeInfo());
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
Map<DataFlowValue, Nullability> getCompleteNullabilityInfo();
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
SetMultimap<DataFlowValue, JetType> getCompleteTypeInfo();
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
Nullability getNullability(@NotNull DataFlowValue key);
|
Nullability getNullability(@NotNull DataFlowValue key);
|
||||||
|
|
||||||
|
|||||||
+6
@@ -17,6 +17,7 @@
|
|||||||
package org.jetbrains.jet.lang.resolve.calls.autocasts;
|
package org.jetbrains.jet.lang.resolve.calls.autocasts;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||||
import org.jetbrains.jet.lang.types.JetType;
|
import org.jetbrains.jet.lang.types.JetType;
|
||||||
|
|
||||||
@@ -38,6 +39,11 @@ public class DataFlowValue {
|
|||||||
this.immanentNullability = immanentNullability;
|
this.immanentNullability = immanentNullability;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public Object getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public Nullability getImmanentNullability() {
|
public Nullability getImmanentNullability() {
|
||||||
return immanentNullability;
|
return immanentNullability;
|
||||||
|
|||||||
+4
-2
@@ -51,8 +51,9 @@ import static org.jetbrains.jet.lang.resolve.calls.autocasts.Nullability.NOT_NUL
|
|||||||
this.typeInfo = typeInfo;
|
this.typeInfo = typeInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
private Map<DataFlowValue, Nullability> getCompleteNullabilityInfo() {
|
public Map<DataFlowValue, Nullability> getCompleteNullabilityInfo() {
|
||||||
Map<DataFlowValue, Nullability> result = Maps.newHashMap();
|
Map<DataFlowValue, Nullability> result = Maps.newHashMap();
|
||||||
DelegatingDataFlowInfo info = this;
|
DelegatingDataFlowInfo info = this;
|
||||||
while (info != null) {
|
while (info != null) {
|
||||||
@@ -68,8 +69,9 @@ import static org.jetbrains.jet.lang.resolve.calls.autocasts.Nullability.NOT_NUL
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
private SetMultimap<DataFlowValue, JetType> getCompleteTypeInfo() {
|
public SetMultimap<DataFlowValue, JetType> getCompleteTypeInfo() {
|
||||||
SetMultimap<DataFlowValue, JetType> result = newTypeInfo();
|
SetMultimap<DataFlowValue, JetType> result = newTypeInfo();
|
||||||
DelegatingDataFlowInfo info = this;
|
DelegatingDataFlowInfo info = this;
|
||||||
while (info != null) {
|
while (info != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user