本文整理汇总了Java中org.codehaus.jackson.annotate.JsonTypeInfo.As类的典型用法代码示例。如果您正苦于以下问题:Java As类的具体用法?Java As怎么用?Java As使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
As类属于org.codehaus.jackson.annotate.JsonTypeInfo包,在下文中一共展示了As类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOperatorValueSerializer
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public static ObjectMapper getOperatorValueSerializer()
{
ObjectMapper returnVal = new ObjectMapper();
returnVal.setVisibilityChecker(new VC());
returnVal.configure(org.codehaus.jackson.map.SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
returnVal.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, As.WRAPPER_OBJECT);
returnVal.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
return returnVal;
}
示例2: getOperatorValueDeserializer
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public static ObjectMapper getOperatorValueDeserializer()
{
ObjectMapper returnVal = new ObjectMapper();
returnVal.setVisibilityChecker(new VC());
returnVal.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
returnVal.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, As.WRAPPER_OBJECT);
return returnVal;
}
示例3: inclusion
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public StdTypeResolverBuilder inclusion(JsonTypeInfo.As paramAs)
{
if (paramAs == null)
throw new IllegalArgumentException("includeAs can not be null");
this._includeAs = paramAs;
return this;
}
示例4: getSubject
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
@Override
@XmlElementRefs({
@XmlElementRef(type = org.tanaguru.entity.subject.PageImpl.class),
@XmlElementRef(type = org.tanaguru.entity.subject.SiteImpl.class)})
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.WRAPPER_OBJECT)
@JsonSubTypes({
@JsonSubTypes.Type(value=org.tanaguru.entity.subject.PageImpl.class, name="Page"),
@JsonSubTypes.Type(value=org.tanaguru.entity.subject.SiteImpl.class, name="Site")})
public WebResourceImpl getSubject() {
return subject;
}
示例5: getParameterSet
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
@Override
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.WRAPPER_OBJECT)
@JsonSubTypes({
@JsonSubTypes.Type(value=org.tanaguru.entity.parameterization.ParameterImpl.class, name="Parameter")})
public Collection<Parameter> getParameterSet() {
if (this.parameterSet == null) {
this.parameterSet = new HashSet<>();
}
return (Collection)parameterSet;
}
示例6: getTypeInclusion
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public JsonTypeInfo.As getTypeInclusion()
{
return JsonTypeInfo.As.PROPERTY;
}
示例7: getTypeInclusion
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public JsonTypeInfo.As getTypeInclusion()
{
return JsonTypeInfo.As.WRAPPER_ARRAY;
}
示例8: getTypeInclusion
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public JsonTypeInfo.As getTypeInclusion()
{
return JsonTypeInfo.As.WRAPPER_OBJECT;
}
示例9: enableDefaultTyping
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public ObjectMapper enableDefaultTyping(DefaultTyping paramDefaultTyping)
{
return enableDefaultTyping(paramDefaultTyping, JsonTypeInfo.As.WRAPPER_ARRAY);
}
示例10: enableDefaultTypingAsProperty
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public ObjectMapper enableDefaultTypingAsProperty(DefaultTyping paramDefaultTyping, String paramString)
{
return setDefaultTyping(new DefaultTypeResolverBuilder(paramDefaultTyping).init(JsonTypeInfo.Id.CLASS, null).inclusion(JsonTypeInfo.As.PROPERTY).typeProperty(paramString));
}
示例11: getTypeInclusion
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public JsonTypeInfo.As getTypeInclusion()
{
return JsonTypeInfo.As.EXTERNAL_PROPERTY;
}
示例12: resolve
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public void resolve(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider)
{
Iterator localIterator1 = this._beanProperties.allProperties();
Object localObject1 = null;
UnwrappedPropertyHandler localUnwrappedPropertyHandler = null;
SettableBeanProperty localSettableBeanProperty2;
if (localIterator1.hasNext())
{
localSettableBeanProperty2 = (SettableBeanProperty)localIterator1.next();
if (localSettableBeanProperty2.hasValueDeserializer())
break label490;
}
label490: for (SettableBeanProperty localSettableBeanProperty3 = localSettableBeanProperty2.withValueDeserializer(findDeserializer(paramDeserializationConfig, paramDeserializerProvider, localSettableBeanProperty2.getType(), localSettableBeanProperty2)); ; localSettableBeanProperty3 = localSettableBeanProperty2)
{
SettableBeanProperty localSettableBeanProperty4 = _resolveManagedReferenceProperty(paramDeserializationConfig, localSettableBeanProperty3);
SettableBeanProperty localSettableBeanProperty5 = _resolveUnwrappedProperty(paramDeserializationConfig, localSettableBeanProperty4);
if (localSettableBeanProperty5 != null)
{
if (localUnwrappedPropertyHandler == null)
localUnwrappedPropertyHandler = new UnwrappedPropertyHandler();
localUnwrappedPropertyHandler.addProperty(localSettableBeanProperty5);
}
while (true)
{
SettableBeanProperty localSettableBeanProperty6 = _resolveInnerClassValuedProperty(paramDeserializationConfig, localSettableBeanProperty5);
if (localSettableBeanProperty6 != localSettableBeanProperty2)
this._beanProperties.replace(localSettableBeanProperty6);
if (!localSettableBeanProperty6.hasValueTypeDeserializer())
break;
TypeDeserializer localTypeDeserializer = localSettableBeanProperty6.getValueTypeDeserializer();
if (localTypeDeserializer.getTypeInclusion() != JsonTypeInfo.As.EXTERNAL_PROPERTY)
break;
if (localObject1 == null);
for (Object localObject2 = new ExternalTypeHandler.Builder(); ; localObject2 = localObject1)
{
((ExternalTypeHandler.Builder)localObject2).addExternal(localSettableBeanProperty6, localTypeDeserializer.getPropertyName());
this._beanProperties.remove(localSettableBeanProperty6);
localObject1 = localObject2;
break;
if ((this._anySetter != null) && (!this._anySetter.hasValueDeserializer()))
this._anySetter = this._anySetter.withValueDeserializer(findDeserializer(paramDeserializationConfig, paramDeserializerProvider, this._anySetter.getType(), this._anySetter.getProperty()));
if (this._valueInstantiator.canCreateUsingDelegate())
{
JavaType localJavaType = this._valueInstantiator.getDelegateType();
if (localJavaType == null)
throw new IllegalArgumentException("Invalid delegate-creator definition for " + this._beanType + ": value instantiator (" + this._valueInstantiator.getClass().getName() + ") returned true for 'canCreateUsingDelegate()', but null for 'getDelegateType()'");
AnnotatedWithParams localAnnotatedWithParams = this._valueInstantiator.getDelegateCreator();
this._delegateDeserializer = findDeserializer(paramDeserializationConfig, paramDeserializerProvider, localJavaType, new BeanProperty.Std(null, localJavaType, this._forClass.getAnnotations(), localAnnotatedWithParams));
}
if (this._propertyBasedCreator != null)
{
Iterator localIterator2 = this._propertyBasedCreator.getCreatorProperties().iterator();
while (localIterator2.hasNext())
{
SettableBeanProperty localSettableBeanProperty1 = (SettableBeanProperty)localIterator2.next();
if (!localSettableBeanProperty1.hasValueDeserializer())
this._propertyBasedCreator.assignDeserializer(localSettableBeanProperty1, findDeserializer(paramDeserializationConfig, paramDeserializerProvider, localSettableBeanProperty1.getType(), localSettableBeanProperty1));
}
}
if (localObject1 != null)
{
this._externalTypeIdHandler = localObject1.build();
this._nonStandardCreation = true;
}
this._unwrappedPropertyHandler = localUnwrappedPropertyHandler;
if (localUnwrappedPropertyHandler != null)
this._nonStandardCreation = true;
return;
}
localSettableBeanProperty5 = localSettableBeanProperty4;
}
}
}
示例13: getTypeInclusion
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public abstract JsonTypeInfo.As getTypeInclusion();
示例14: inclusion
import org.codehaus.jackson.annotate.JsonTypeInfo.As; //导入依赖的package包/类
public abstract T inclusion(JsonTypeInfo.As paramAs);