提交 709bdb7d 编写于 作者: B Bogdan Kobylynskyi

Fix javadoc

上级 d84d9104
......@@ -21,7 +21,7 @@ public class FieldDefinitionToParameterMapper {
* @param mappingConfig Global mapping configuration
* @param fieldDefinitions List of GraphQL field definitions
* @param parentTypeName Name of the parent GraphQL type
* @return Freemarker data model of the GraphQL interface
* @return Freemarker data model of the GraphQL field definition
*/
public static List<ParameterDefinition> map(MappingConfig mappingConfig,
List<FieldDefinition> fieldDefinitions,
......
......@@ -155,10 +155,28 @@ class GraphqlTypeToJavaTypeMapper {
return annotations;
}
/**
* Wrap java type into collection. E.g.: "String" becomes "Collection<String"
*
* @param type Anything that will be wrapped into Collection<>
* @return String wrapped into Collection<>
*/
private static String wrapIntoJavaCollection(String type) {
return String.format("Collection<%s>", type);
}
/**
* Wraps type into subscriptionReturnType (defined in the mapping configuration.
* Example:
* Given GraphQL schema: type Subscription { eventsCreated: [Event!]! }
* Given subscriptionReturnType in mapping config: org.reactivestreams.Publisher
* Return: org.reactivestreams.Publisher<Event>
*
* @param mappingConfig Global mapping configuration
* @param javaTypeName The type that will be wrapped into
* @param parentTypeName Name of the parent type
* @return Java type wrapped into the subscriptionReturnType
*/
static String wrapIntoSubscriptionIfRequired(MappingConfig mappingConfig, String javaTypeName, String parentTypeName) {
if (parentTypeName.equalsIgnoreCase(Operation.SUBSCRIPTION.name())
&& !Utils.isBlank(mappingConfig.getSubscriptionReturnType())) {
......
......@@ -15,6 +15,14 @@ import java.util.stream.Collectors;
*/
public class InputValueDefinitionToParameterMapper {
/**
* Map input value definition to a Freemarker-understandable data model type
*
* @param mappingConfig Global mapping configuration
* @param valueDefinitions List of GraphQL value definitions
* @param parentTypeName Name of the parent GraphQL type
* @return Freemarker data model of the GraphQL input value definition
*/
public static List<ParameterDefinition> map(MappingConfig mappingConfig, List<InputValueDefinition> valueDefinitions, String parentTypeName) {
if (valueDefinitions == null) {
return Collections.emptyList();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册