public class CustomEnumJsonValueDefinitionProvider extends Object implements CustomDefinitionProviderV2
CustomDefinitionProviderV2 interface for treating enum types as plain strings based on a JsonValue annotation
being present with value = true on exactly one argument-free method. If no such annotation exists, no custom definition will be returned;
thereby falling back on whatever is defined in a following custom definition (e.g. from one of the standard generator Options).| Constructor and Description |
|---|
CustomEnumJsonValueDefinitionProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected com.fasterxml.classmate.members.ResolvedMethod |
getJsonValueAnnotatedMethod(com.fasterxml.classmate.ResolvedType javaType,
SchemaGenerationContext context)
Look-up the single
JsonValue annotated method with value = true and no expected arguments. |
CustomDefinition |
provideCustomSchemaDefinition(com.fasterxml.classmate.ResolvedType javaType,
SchemaGenerationContext context) |
public CustomEnumJsonValueDefinitionProvider()
public CustomDefinition provideCustomSchemaDefinition(com.fasterxml.classmate.ResolvedType javaType, SchemaGenerationContext context)
provideCustomSchemaDefinition in interface CustomDefinitionProviderV2protected com.fasterxml.classmate.members.ResolvedMethod getJsonValueAnnotatedMethod(com.fasterxml.classmate.ResolvedType javaType,
SchemaGenerationContext context)
JsonValue annotated method with value = true and no expected arguments.javaType - targeted type to look-up serialization method forcontext - generation context providing access to type resolution contextJsonValue annotationCopyright © 2020 VicTools. All rights reserved.