/** * Converts a non-null {@link List} of {@link AnnotatedJavaType}s into a * {@link List} of equivalent {@link JavaType}s. Note the annotation * metadata will be discarded, as it cannot be stored inside a * {@link JavaType}. * * @param annotatedJavaTypes to convert (required) * @return the equivalent {@link AnnotatedJavaType}s, but without any actual * annotations (never returns null) */ public static List<JavaType> convertFromAnnotatedJavaTypes( final List<AnnotatedJavaType> annotatedJavaTypes) { Validate.notNull(annotatedJavaTypes, "Annotated Java types required"); final List<JavaType> result = new ArrayList<JavaType>(); for (final AnnotatedJavaType annotatedJavaType : annotatedJavaTypes) { result.add(convertFromAnnotatedJavaType(annotatedJavaType)); } return result; }
types.add(AnnotatedJavaType.convertFromAnnotatedJavaType(parameter)); types.addAll(AnnotatedJavaType.convertFromAnnotatedJavaType(parameter).getParameters());
/** * Converts a non-null {@link List} of {@link AnnotatedJavaType}s into a * {@link List} of equivalent {@link JavaType}s. Note the annotation * metadata will be discarded, as it cannot be stored inside a * {@link JavaType}. * * @param annotatedJavaTypes to convert (required) * @return the equivalent {@link AnnotatedJavaType}s, but without any actual * annotations (never returns null) */ public static List<JavaType> convertFromAnnotatedJavaTypes( final List<AnnotatedJavaType> annotatedJavaTypes) { Validate.notNull(annotatedJavaTypes, "Annotated Java types required"); final List<JavaType> result = new ArrayList<JavaType>(); for (final AnnotatedJavaType annotatedJavaType : annotatedJavaTypes) { result.add(convertFromAnnotatedJavaType(annotatedJavaType)); } return result; }