DfType (DfaMemoryState state, @NotNull DfaValue value) { if (value instanceof DfaWrappedValue && ((DfaWrappedValue)value).getSpecialField() == SpecialField.UNBOX) { return state.getDfType(((DfaWrappedValue)value).getWrappedValue()); } if (value instanceof DfaVariableValue && TypeConstraint.fromDfType(value.getDfType()).isPrimitiveWrapper()) { return state.getDfType(SpecialField.UNBOX.createValue(value.getFactory(), value)); } if (value instanceof DfaTypeValue) { DfReferenceType refType = tryCast(value.getDfType(), DfReferenceType.class); if (refType != null && refType.getSpecialField() == SpecialField.UNBOX) { return refType.getSpecialFieldType(); } } return state.getDfType(value); }