if (asClass.isAssignableFrom(String.class)) {
value = (T) psiEnumConstant.getName();
}
} else if (resolved instanceof PsiVariable) {
final PsiVariable psiVariable = (PsiVariable) resolved;
Object elementValue = psiVariable.computeConstantValue();
if (null != elementValue && asClass.isAssignableFrom(elementValue.getClass())) {
value = (T) elementValue;
}
}
} else if (psiElement instanceof PsiLiteralExpression) {