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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
@JsonProperty("parameters") @JsonUnwrapped @XmlElement(name = "parameter") @Nonnull public List<ParameterDTO> getParameters() { return this; }
@JsonProperty("searchResults") @JsonUnwrapped @XmlElement(name = "searchResult") @Nonnull public List<SearchResultDTO> getSearchResults() { return this; }
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); } } }
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()); }
@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; }
@JsonUnwrapped public NotFoundModel getModel() { return model; }
@JsonUnwrapped(prefix = "pre", suffix = "suf") public NotFoundModel getModel2() { return model2; }
@JsonUnwrapped Status getStatus();
/** * @return the data */ @JsonUnwrapped public T getData() { return data; }
/** * @param data the data to set */ @JsonUnwrapped public void setData(T data) { this.data = data; }
@JsonCreator public UserForm(@JsonUnwrapped User userConfig, @JsonProperty("password") String password) { this.userConfig = userConfig; this.password = password; }
@JsonUnwrapped public User getUserConfig() { return userConfig; }
@JsonUnwrapped public void setInner(Inner inner) { this.inner = inner; }
@JsonProperty @JsonUnwrapped public Map<String, Object> metadata() { return metadata; }
@JsonUnwrapped public Resources<T> getNested() { return this.nested; }
@JsonUnwrapped public Value getValue() { return value; }
@JsonUnwrapped public Object getContent() { return this.content; }
/** * Return the status of the health. * @return the status (never {@code null}) */ @JsonUnwrapped public Status getStatus() { return this.status; }
@JsonCreator JsonLdRoot(@JsonProperty("@context") Context context, @JsonUnwrapped T content) { this.context = context; this.content = content; }
@JsonUnwrapped public T getContent() { return content; }
@JsonUnwrapped public Link getLink() { return link; }
/** * Returns the underlying entity. * * @return the content */ @JsonUnwrapped // @XmlAnyElement public T getContent() { return content; }
/** * TypeDescription of the column's type. Gets unwrapped when used by a Jackson object encoder. * @return The column's type description */ @JsonUnwrapped public TypeDescription getType() { return _type; }
@JsonProperty("department") @JsonUnwrapped public List<Department> getDepartments() { return departments; }
@JsonUnwrapped public ActivityDto getDto() { return dto; }
@JsonUnwrapped @JsonProperty(access = Access.READ_ONLY) public UserPrivateDataBaseDto getPrivateData() { return privateData; }
@Override @JsonSerialize(using = LinkListSerializer.class) @JsonUnwrapped public List<Link> getLinks() { return super.getLinks(); }