本文整理汇总了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());
}
示例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());
}
示例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;
}
示例4: resolveParameterType
import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
public final JavaType resolveParameterType(int paramInt, TypeBindings paramTypeBindings)
{
return paramTypeBindings.resolveType(getGenericParameterType(paramInt));
}
示例5: getType
import com.fasterxml.jackson.databind.type.TypeBindings; //导入方法依赖的package包/类
public JavaType getType(TypeBindings paramTypeBindings)
{
return paramTypeBindings.resolveType(getGenericType());
}
示例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));
}
示例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());
}