use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty in project pinpoint by naver.
the class TransactionInfoViewModel method getApplicationMapData.
@JsonProperty("applicationMapData")
public Map<String, List<Object>> getApplicationMapData() {
Map<String, List<Object>> result = new HashMap<String, List<Object>>();
if (timeHistogramFormat == TimeHistogramFormat.V2) {
for (Node node : nodes) {
node.setTimeHistogramFormat(timeHistogramFormat);
}
for (Link link : links) {
link.setTimeHistogramFormat(timeHistogramFormat);
}
}
List<Object> nodeDataArray = new ArrayList<>(nodes);
result.put("nodeDataArray", nodeDataArray);
List<Object> linkDataArray = new ArrayList<>(links);
result.put("linkDataArray", linkDataArray);
return result;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty in project chassis by Kixeye.
the class ConstructorParameterModelProperty method getModelProperties.
/**
* Creates a collection of ConstructorParameterModelProperty objects from the arguments of the given ResolvedConstructor.
* Only args annotated with @JsonProperty are included. Scala Case Classes are a special case and do not require the annotation.
*
* @param resolvedConstructor the constructor to get
* @param alternateTypeProvider for resolving alternative types for the found arguments
* @return the collection of ConstructorParameterModelProperty objects
*/
public static ImmutableList<ConstructorParameterModelProperty> getModelProperties(ResolvedConstructor resolvedConstructor, AlternateTypeProvider alternateTypeProvider) {
Builder<ConstructorParameterModelProperty> listBuilder = new Builder<>();
if (resolvedConstructor.getRawMember().getAnnotation(JsonCreator.class) != null || scala.Product.class.isAssignableFrom(resolvedConstructor.getDeclaringType().getErasedType())) {
// constructor for normal classes must be annotated with @JsonCreator. Scala Case Classes are a special case
for (int i = 0; i < resolvedConstructor.getArgumentCount(); i++) {
AnnotationMap annotationMap = annotationMap(resolvedConstructor.getRawMember().getParameterAnnotations()[i]);
ResolvedType parameterType = resolvedConstructor.getArgumentType(i);
if (annotationMap.get(JsonProperty.class) != null) {
listBuilder.add(new ConstructorParameterModelProperty(parameterType, alternateTypeProvider, annotationMap));
}
}
}
return listBuilder.build();
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty in project jirm by agentgt.
the class SqlParameterDefinition method getSqlBeanParametersFromJsonCreatorConstructor.
private static Map<String, SqlParameterDefinition> getSqlBeanParametersFromJsonCreatorConstructor(Constructor<?> c, SqlObjectConfig config) {
Map<String, SqlParameterDefinition> parameters = new LinkedHashMap<String, SqlParameterDefinition>();
Annotation[][] aas = c.getParameterAnnotations();
Class<?>[] pts = c.getParameterTypes();
if (aas == null || aas.length == 0) {
return parameters;
}
for (int i = 0; i < aas.length; i++) {
Annotation[] as = aas[i];
Class<?> parameterType = pts[i];
for (int j = 0; j < as.length; j++) {
Annotation a = as[j];
if (JsonProperty.class.equals(a.annotationType())) {
JsonProperty p = (JsonProperty) a;
String value = p.value();
final SqlParameterDefinition definition = parameterDef(config, c.getDeclaringClass(), value, parameterType, i);
parameters.put(value, definition);
}
}
}
return parameters;
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty in project OpenRefine by OpenRefine.
the class FileProjectManager method loadProjects.
@JsonProperty("projectIDs")
protected void loadProjects(List<Long> projectIDs) {
for (Long id : projectIDs) {
File projectDir = getProjectDir(id);
ProjectMetadata metadata = ProjectMetadataUtilities.load(projectDir);
mergeEmptyUserMetadata(metadata);
_projectsMetadata.put(id, metadata);
if (metadata != null && metadata.getTags() != null) {
for (String tag : metadata.getTags()) {
if (_projectsTags.containsKey(tag)) {
_projectsTags.put(tag, _projectsTags.get(tag) + 1);
} else {
_projectsTags.put(tag, 1);
}
}
}
}
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty in project dhis2-core by dhis2.
the class ImportReport method getStats.
@JsonProperty
@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public Stats getStats() {
Stats stats = new Stats();
typeReportMap.values().forEach(typeReport -> stats.merge(typeReport.getStats()));
return stats;
}
Aggregations