DfType (@NotNull DfType qualifierType, @NotNull DfType fieldValue) { if (this == STRING_LENGTH && fieldValue.isConst(0)) { return DfTypes.referenceConstant("", TypeConstraint.fromDfType(qualifierType)); } if (this == ENUM_ORDINAL) { Integer constValue = fieldValue.getConstantOfType(Integer.class); if (constValue != null) { TypeConstraint qualifier = TypeConstraint.fromDfType(qualifierType); PsiEnumConstant constant = qualifier.getEnumConstant(constValue); if (constant != null) { return DfTypes.referenceConstant(constant, TypeConstraint.fromDfType(qualifierType)); } } } return asDfType(fieldValue).meet(qualifierType); }