本文整理汇总了Java中com.fasterxml.jackson.annotation.JsonUnwrapped类的典型用法代码示例。如果您正苦于以下问题:Java JsonUnwrapped类的具体用法?Java JsonUnwrapped怎么用?Java JsonUnwrapped使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JsonUnwrapped类属于com.fasterxml.jackson.annotation包,在下文中一共展示了JsonUnwrapped类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isUnwrapped
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
private static boolean isUnwrapped(PropertyDescriptor propertyDescriptor, Field field) {
if (field != null && field.isAnnotationPresent(JsonUnwrapped.class)) {
return true;
}
Method readMethod = propertyDescriptor.getReadMethod();
if (readMethod != null && readMethod.isAnnotationPresent(JsonUnwrapped.class)) {
return true;
}
Method writeMethod = propertyDescriptor.getWriteMethod();
if (writeMethod != null && writeMethod.isAnnotationPresent(JsonUnwrapped.class)) {
return true;
}
return false;
}
示例2: color
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
/**
* The {@link Color} to display on the sidebar next to the {@link Attachment}.
*
* @return an {@link Optional} containing a {@link Color}
* @see Color
*/
@Value.Default
@Nullable
@JsonUnwrapped
public Color color() {
return null;
}
示例3: author
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
/**
* The {@link Author} for this {@link Attachment}. It is displayed in a small grayed-out section at the top
* before the main {@link Attachment} body.
*
* @return an {@link Optional} containing the {@link Author}
*/
@Value.Default
@Nullable
@JsonUnwrapped
public Author author() {
return null;
}
示例4: title
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
/**
* The {@link Title} for this {@link Attachment}. It is displayed as larger, bold text near the top before the main
* {@link Attachment} body.
*
* @return an {@link Optional} containing the {@link Title}
*/
@Value.Default
@Nullable
@JsonUnwrapped
public Title title() {
return null;
}
示例5: footer
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
/**
* The {@link Footer} for this {@link Attachment}. This will appear below the body of the main message
* {@link Attachment} in smaller, grayed-out text.
*
* @return an {@link Optional} containing the {@link Footer}
*/
@Value.Default
@Nullable
@JsonUnwrapped
public Footer footer() {
return null;
}
示例6: getParameters
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
@JsonProperty("parameters")
@JsonUnwrapped
@XmlElement(name = "parameter")
@Nonnull
public List<ParameterDTO> getParameters() {
return this;
}
示例7: getSearchResults
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
@JsonProperty("searchResults")
@JsonUnwrapped
@XmlElement(name = "searchResult")
@Nonnull
public List<SearchResultDTO> getSearchResults() {
return this;
}
示例8: addFieldToMap
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
private void addFieldToMap(Field field, ObjectContext objectContext,
Map<Field, ObjectContext> fieldContextMap, Set<Type> unwrappedTypes,
SchemaPropertyContext context) {
if (objectContext.isApplicable(field, context)) {
if (field.getAnnotation(JsonUnwrapped.class) != null) {
fieldContextMap.putAll(getUnwrappedFieldsMap(field, objectContext, unwrappedTypes,
context));
} else {
fieldContextMap.put(field, objectContext);
}
}
}
示例9: findUnwrappingNameTransformer
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
public NameTransformer findUnwrappingNameTransformer(AnnotatedMember paramAnnotatedMember)
{
JsonUnwrapped localJsonUnwrapped = (JsonUnwrapped)paramAnnotatedMember.getAnnotation(JsonUnwrapped.class);
if ((localJsonUnwrapped == null) || (!localJsonUnwrapped.enabled()))
return null;
return NameTransformer.simpleTransformer(localJsonUnwrapped.prefix(), localJsonUnwrapped.suffix());
}
示例10: getLinkExtensions
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
@JsonUnwrapped
public DynaBean getLinkExtensions() {
DynaBean dynaBean = new DynaBean();
LinkedHashMap<String, String> linkExtensions = new LinkedHashMap<String, String>();
linkExtensions.putAll(linkParams.toSingleValueMap());
for (LinkParam linkParam : LinkParam.values()) {
linkExtensions.remove(linkParam.paramName);
}
dynaBean.putAll(linkExtensions);
return dynaBean;
}
示例11: getModel
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
@JsonUnwrapped
public NotFoundModel getModel() {
return model;
}
示例12: getModel2
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
@JsonUnwrapped(prefix = "pre", suffix = "suf")
public NotFoundModel getModel2() {
return model2;
}
示例13: getStatus
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
@JsonUnwrapped
Status getStatus();
示例14: getData
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
/**
* @return the data
*/
@JsonUnwrapped
public T getData() {
return data;
}
示例15: setData
import com.fasterxml.jackson.annotation.JsonUnwrapped; //导入依赖的package包/类
/**
* @param data the data to set
*/
@JsonUnwrapped
public void setData(T data) {
this.data = data;
}