当前位置: 首页>>代码示例>>Java>>正文


Java TypeBindings.resolveType方法代码示例

本文整理汇总了Java中com.fasterxml.jackson.databind.type.TypeBindings.resolveType方法的典型用法代码示例。如果您正苦于以下问题:Java TypeBindings.resolveType方法的具体用法?Java TypeBindings.resolveType怎么用?Java TypeBindings.resolveType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.fasterxml.jackson.databind.type.TypeBindings的用法示例。


在下文中一共展示了TypeBindings.resolveType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getType

import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
protected JavaType getType(TypeBindings paramTypeBindings, TypeVariable<?>[] paramArrayOfTypeVariable)
{
  if ((paramArrayOfTypeVariable != null) && (paramArrayOfTypeVariable.length > 0))
  {
    paramTypeBindings = paramTypeBindings.childInstance();
    int i = paramArrayOfTypeVariable.length;
    for (int j = 0; j < i; j++)
    {
      TypeVariable<?> localTypeVariable = paramArrayOfTypeVariable[j];
      paramTypeBindings._addPlaceholder(localTypeVariable.getName());
      Type localType = localTypeVariable.getBounds()[0];
      JavaType localJavaType;
      if (localType == null)
        localJavaType = TypeFactory.unknownType();
      else
        localJavaType = paramTypeBindings.resolveType(localType);
      paramTypeBindings.addBinding(localTypeVariable.getName(), localJavaType);
    }
  }
  return paramTypeBindings.resolveType(getGenericType());
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:22,代码来源:AnnotatedWithParams.java

示例2: getType

import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
protected JavaType getType(TypeBindings bindings, TypeVariable<?>[] typeParams)
{
    // [JACKSON-468] Need to consider local type binding declarations too...
    if (typeParams != null && typeParams.length > 0) {
        bindings = bindings.childInstance();
        for (TypeVariable<?> var : typeParams) {
            String name = var.getName();
            // to prevent infinite loops, need to first add placeholder ("<T extends Enum<T>>" etc)
            bindings._addPlaceholder(name);
            // About only useful piece of information is the lower bound (which is at least Object.class)
            Type lowerBound = var.getBounds()[0];
            JavaType type = (lowerBound == null) ? TypeFactory.unknownType()
                    : bindings.resolveType(lowerBound);
            bindings.addBinding(var.getName(), type);
        }
    }
    return bindings.resolveType(getGenericType());
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:19,代码来源:AnnotatedWithParams.java

示例3: constructValueInstantiator

import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
public ValueInstantiator constructValueInstantiator(DeserializationConfig config)
{
    StdValueInstantiator inst = new StdValueInstantiator(config, _beanDesc.getType());

    JavaType delegateType;

    if (_delegateCreator == null) {
        delegateType = null;
    } else {
        // need to find type...
        int ix = 0;
        if (_delegateArgs != null) {
            for (int i = 0, len = _delegateArgs.length; i < len; ++i) {
                if (_delegateArgs[i] == null) { // marker for delegate itself
                    ix = i;
                    break;
                }
            }
        }
        TypeBindings bindings = _beanDesc.bindingsForBeanType();
        delegateType = bindings.resolveType(_delegateCreator.getGenericParameterType(ix));
    }
    
    inst.configureFromObjectSettings(_defaultConstructor,
            _delegateCreator, delegateType, _delegateArgs,
            _propertyBasedCreator, _propertyBasedArgs);
    inst.configureFromStringCreator(_stringCreator);
    inst.configureFromIntCreator(_intCreator);
    inst.configureFromLongCreator(_longCreator);
    inst.configureFromDoubleCreator(_doubleCreator);
    inst.configureFromBooleanCreator(_booleanCreator);
    return inst;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:34,代码来源:CreatorCollector.java

示例4: resolveParameterType

import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
public final JavaType resolveParameterType(int paramInt, TypeBindings paramTypeBindings)
{
  return paramTypeBindings.resolveType(getGenericParameterType(paramInt));
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:AnnotatedWithParams.java

示例5: getType

import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
public JavaType getType(TypeBindings paramTypeBindings)
{
  return paramTypeBindings.resolveType(getGenericType());
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:Annotated.java

示例6: resolveParameterType

import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
/**
 * Method called to fully resolve type of one of parameters, given
 * specified type variable bindings.
 */
public final JavaType resolveParameterType(int index, TypeBindings bindings) {
    return bindings.resolveType(getGenericParameterType(index));
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:8,代码来源:AnnotatedWithParams.java

示例7: getType

import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
/**
 * Full generic type of the annotated element; definition
 * of what exactly this means depends on sub-class.
 */
public JavaType getType(TypeBindings context) {
    return context.resolveType(getGenericType());
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:8,代码来源:Annotated.java


注:本文中的com.fasterxml.jackson.databind.type.TypeBindings.resolveType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。