Example usage for com.fasterxml.jackson.databind JavaType getClass

List of usage examples for com.fasterxml.jackson.databind JavaType getClass

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind JavaType getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:io.sinistral.proteus.server.tools.swagger.Reader.java

public Operation parseMethod(Method method) {
    JavaType classType = TypeFactory.defaultInstance().constructType(method.getDeclaringClass());
    BeanDescription bd = new ObjectMapper().getSerializationConfig().introspect(classType);
    return parseMethod(classType.getClass(), method,
            bd.findMethod(method.getName(), method.getParameterTypes()), Collections.<Parameter>emptyList(),
            Collections.<ApiResponse>emptyList(), Collections.emptyList());
}

From source file:org.broadleafcommerce.core.web.api.WrapperOverrideTypeModifier.java

@Override
public JavaType modifyType(JavaType type, Type jdkType, TypeBindings context, TypeFactory typeFactory) {
    try {/*from w  ww  .ja v a 2 s .c om*/
        if (type.getClass().isAssignableFrom(SimpleType.class)) {
            Object overriddenBean = applicationContext.getBean(type.getRawClass().getName());
            return SimpleType.construct(overriddenBean.getClass());
        }
    } catch (NoSuchBeanDefinitionException e) {
        LOG.debug("No configured bean for " + type.getClass().getName() + " returning original type");
    }
    return type;
}