use of org.jetbrains.plugins.groovy.lang.psi.dataFlow.DFAType in project intellij-community by JetBrains.
the class TypeDfaState method getBindings.
Map<String, PsiType> getBindings(Instruction instruction) {
HashMap<String, PsiType> map = ContainerUtil.newHashMap();
for (Map.Entry<String, DFAType> entry : myVarTypes.entrySet()) {
DFAType value = entry.getValue();
map.put(entry.getKey(), value == null ? null : value.negate(instruction).getResultType());
}
return map;
}
use of org.jetbrains.plugins.groovy.lang.psi.dataFlow.DFAType in project intellij-community by JetBrains.
the class TypeDfaState method joinState.
void joinState(TypeDfaState another, PsiManager manager) {
for (Map.Entry<String, DFAType> entry : another.myVarTypes.entrySet()) {
final String name = entry.getKey();
final DFAType t1 = entry.getValue();
if (myVarTypes.containsKey(name)) {
final DFAType t2 = myVarTypes.get(name);
if (t1 != null && t2 != null) {
myVarTypes.put(name, DFAType.create(t1, t2, manager));
} else {
myVarTypes.put(name, null);
}
}
}
}