protected LightweightTypeReference getLightweightExpectedType(XExpression expr) { IResolvedTypes resolvedTypes = getResolvedTypes(expr); LightweightTypeReference expectedType = resolvedTypes.getExpectedType(expr); return expectedType; }
protected LightweightTypeReference getLightweightReturnType(XExpression expr) { IResolvedTypes resolvedTypes = getResolvedTypes(expr); LightweightTypeReference returnType = resolvedTypes.getReturnType(expr); return returnType; }
protected LightweightTypeReference getLightweightType(XExpression expr) { IResolvedTypes resolvedTypes = getResolvedTypes(expr); LightweightTypeReference actualType = resolvedTypes.getActualType(expr); return actualType; }
protected LightweightTypeReference getLightweightType(JvmIdentifiableElement identifiable) { IResolvedTypes resolvedTypes = getResolvedTypes(identifiable); LightweightTypeReference actualType = resolvedTypes.getActualType(identifiable); return actualType; }
protected boolean needsSneakyThrow(XExpression obj, Collection<JvmTypeReference> declaredExceptions) { IResolvedTypes resolvedTypes = getResolvedTypes(obj); List<LightweightTypeReference> thrownExceptions = resolvedTypes.getThrownExceptions(obj); return hasUnhandledException(thrownExceptions, declaredExceptions); }
protected LightweightTypeReference getTypeForVariableDeclaration(XExpression expr) { IResolvedTypes resolvedTypes = getResolvedTypes(expr); LightweightTypeReference actualType = resolvedTypes.getActualType(expr); if (actualType.isPrimitiveVoid()) { LightweightTypeReference expectedType = resolvedTypes.getExpectedType(expr); if (expectedType == null) { expectedType = resolvedTypes.getExpectedReturnType(expr); if (expectedType == null) { expectedType = resolvedTypes.getReturnType(expr); } } if (expectedType != null && !expectedType.isPrimitiveVoid()) { actualType = expectedType; } } return actualType; }