private static void checkBeanTypeForWildcardsAndTypeVariables(Type beanType, Type type, BeanAttributes<?> attributes) { if (type instanceof TypeVariable<?>) { if (!attributes.getScope().equals(Dependent.class)) { throw MetadataLogger.LOG.beanWithParameterizedTypeContainingTypeVariablesMustBeDependentScoped(beanType, attributes); } } else if (type instanceof WildcardType) { throw MetadataLogger.LOG.parameterizedTypeContainingWildcardParameterIsNotAValidBeanType(beanType, attributes); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; for (Type typeArgument : parameterizedType.getActualTypeArguments()) { checkBeanTypeForWildcardsAndTypeVariables(beanType, typeArgument, attributes); } } else if (type instanceof GenericArrayType) { GenericArrayType arrayType = (GenericArrayType) type; checkBeanTypeForWildcardsAndTypeVariables(beanType, arrayType.getGenericComponentType(), attributes); } }
private static void checkBeanTypeForWildcardsAndTypeVariables(Type beanType, Type type, BeanAttributes<?> attributes) { if (type instanceof TypeVariable<?>) { if (!attributes.getScope().equals(Dependent.class)) { throw MetadataLogger.LOG.beanWithParameterizedTypeContainingTypeVariablesMustBeDependentScoped(beanType, attributes); } } else if (type instanceof WildcardType) { throw MetadataLogger.LOG.parameterizedTypeContainingWildcardParameterIsNotAValidBeanType(beanType, attributes); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; for (Type typeArgument : parameterizedType.getActualTypeArguments()) { checkBeanTypeForWildcardsAndTypeVariables(beanType, typeArgument, attributes); } } else if (type instanceof GenericArrayType) { GenericArrayType arrayType = (GenericArrayType) type; checkBeanTypeForWildcardsAndTypeVariables(beanType, arrayType.getGenericComponentType(), attributes); } }
private static void checkBeanTypeForWildcardsAndTypeVariables(Type beanType, Type type, BeanAttributes<?> attributes) { if (type instanceof TypeVariable<?>) { if (!attributes.getScope().equals(Dependent.class)) { throw MetadataLogger.LOG.beanWithParameterizedTypeContainingTypeVariablesMustBeDependentScoped(beanType, attributes); } } else if (type instanceof WildcardType) { throw MetadataLogger.LOG.parameterizedTypeContainingWildcardParameterIsNotAValidBeanType(beanType, attributes); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; for (Type typeArgument : parameterizedType.getActualTypeArguments()) { checkBeanTypeForWildcardsAndTypeVariables(beanType, typeArgument, attributes); } } else if (type instanceof GenericArrayType) { GenericArrayType arrayType = (GenericArrayType) type; checkBeanTypeForWildcardsAndTypeVariables(beanType, arrayType.getGenericComponentType(), attributes); } }
private static void checkBeanTypeForWildcardsAndTypeVariables(Type beanType, Type type, BeanAttributes<?> attributes) { if (type instanceof TypeVariable<?>) { if (!attributes.getScope().equals(Dependent.class)) { throw MetadataLogger.LOG.beanWithParameterizedTypeContainingTypeVariablesMustBeDependentScoped(beanType, attributes); } } else if (type instanceof WildcardType) { throw MetadataLogger.LOG.parameterizedTypeContainingWildcardParameterIsNotAValidBeanType(beanType, attributes); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; for (Type typeArgument : parameterizedType.getActualTypeArguments()) { checkBeanTypeForWildcardsAndTypeVariables(beanType, typeArgument, attributes); } } else if (type instanceof GenericArrayType) { GenericArrayType arrayType = (GenericArrayType) type; checkBeanTypeForWildcardsAndTypeVariables(beanType, arrayType.getGenericComponentType(), attributes); } }
private static void checkBeanTypeForWildcardsAndTypeVariables(Type beanType, Type type, BeanAttributes<?> attributes) { if (type instanceof TypeVariable<?>) { if (!attributes.getScope().equals(Dependent.class)) { throw MetadataLogger.LOG.beanWithParameterizedTypeContainingTypeVariablesMustBeDependentScoped(beanType, attributes); } } else if (type instanceof WildcardType) { throw MetadataLogger.LOG.parameterizedTypeContainingWildcardParameterIsNotAValidBeanType(beanType, attributes); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; for (Type typeArgument : parameterizedType.getActualTypeArguments()) { checkBeanTypeForWildcardsAndTypeVariables(beanType, typeArgument, attributes); } } else if (type instanceof GenericArrayType) { GenericArrayType arrayType = (GenericArrayType) type; checkBeanTypeForWildcardsAndTypeVariables(beanType, arrayType.getGenericComponentType(), attributes); } }
private static void checkBeanTypeForWildcardsAndTypeVariables(Type beanType, Type type, BeanAttributes<?> attributes) { if (type instanceof TypeVariable<?>) { if (!attributes.getScope().equals(Dependent.class)) { throw MetadataLogger.LOG.beanWithParameterizedTypeContainingTypeVariablesMustBeDependentScoped(beanType, attributes); } } else if (type instanceof WildcardType) { throw MetadataLogger.LOG.parameterizedTypeContainingWildcardParameterIsNotAValidBeanType(beanType, attributes); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; for (Type typeArgument : parameterizedType.getActualTypeArguments()) { checkBeanTypeForWildcardsAndTypeVariables(beanType, typeArgument, attributes); } } else if (type instanceof GenericArrayType) { GenericArrayType arrayType = (GenericArrayType) type; checkBeanTypeForWildcardsAndTypeVariables(beanType, arrayType.getGenericComponentType(), attributes); } }