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