Example usage for com.fasterxml.jackson.databind DatabindContext constructType

List of usage examples for com.fasterxml.jackson.databind DatabindContext constructType

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind DatabindContext constructType.

Prototype

public JavaType constructType(Type type) 

Source Link

Document

Convenience method for constructing JavaType for given JDK type (usually java.lang.Class )

Usage

From source file:com.basistech.rosette.dm.jackson.DmTypeIdResolver.java

@Override
public JavaType typeFromId(DatabindContext context, String id) {
    KnownAttribute attribute = KnownAttribute.getAttributeForKey(id);
    if (attribute == null) {
        attribute = KnownAttribute.UNKNOWN; // extension mechanism, build a BaseAttribute.
    }/*from   w  ww .j  a  v  a2  s.  c  o  m*/
    return context.constructType(attribute.attributeClass());
}