List of usage examples for com.fasterxml.jackson.databind.jsonFormatVisitors JsonFormatVisitable acceptJsonFormatVisitor
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException;
From source file:java2typescript.jackson.module.visitors.TSJsonFormatVisitorWrapper.java
/** Visit recursively the type, or return a cached response */ public static AbstractType getTSTypeForHandler(ABaseTSJsonFormatVisitor<?> baseVisitor, JsonFormatVisitable handler, JavaType typeHint, Configuration conf) throws JsonMappingException { AbstractType computedType = baseVisitor.getComputedTypes().get(typeHint); if (computedType != null) { return computedType; }/*www .ja v a2 s . com*/ TSJsonFormatVisitorWrapper visitor = new TSJsonFormatVisitorWrapper(baseVisitor, conf); handler.acceptJsonFormatVisitor(visitor, typeHint); baseVisitor.getComputedTypes().put(typeHint, visitor.getType()); return visitor.getType(); }
From source file:java2typescript.jackson.module.visitors.TSJsonArrayFormatVisitor.java
@Override public void itemsFormat(JsonFormatVisitable handler, JavaType elementType) throws JsonMappingException { TSJsonFormatVisitorWrapper visitorWrapper = new TSJsonFormatVisitorWrapper(this, conf); handler.acceptJsonFormatVisitor(visitorWrapper, elementType); type.setItemType(visitorWrapper.getType()); }
From source file:capital.scalable.restdocs.jackson.FieldDocumentationArrayVisitor.java
@Override public void itemsFormat(JsonFormatVisitable handler, JavaType elementType) throws JsonMappingException { String elementPath = path + "[]"; JsonFormatVisitorWrapper visitor = new FieldDocumentationVisitorWrapper(getProvider(), context, elementPath, null);//from www . j av a2 s . c om handler.acceptJsonFormatVisitor(visitor, elementType); }