本文整理匯總了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;
}