Java 类com.fasterxml.jackson.annotation.JsonAnySetter 实例源码

项目:crnk-framework    文件:ResourceInformation.java   
private void initAny() {
    final Method jsonAnyGetter = ClassUtils.findMethodWith(resourceClass, JsonAnyGetter.class);
    final Method jsonAnySetter = ClassUtils.findMethodWith(resourceClass, JsonAnySetter.class);

    if (absentAnySetter(jsonAnyGetter, jsonAnySetter)) {
        throw new InvalidResourceException(
                String.format("A resource %s has to have both methods annotated with @JsonAnySetter and @JsonAnyGetter",
                        resourceClass.getCanonicalName()));
    }

    if (jsonAnyGetter != null) {
        anyFieldAccessor = new AnyResourceFieldAccessor() {

            @Override
            public Object getValue(Object resource, String name) {
                try {
                    return jsonAnyGetter.invoke(resource, name);
                } catch (IllegalAccessException | InvocationTargetException e) {
                    throw new ResourceException(
                            String.format("Exception while reading %s.%s due to %s", resource, name, e.getMessage()), e);
                }
            }

            @Override
            public void setValue(Object resource, String name, Object fieldValue) {
                try {
                    jsonAnySetter.invoke(resource, name, fieldValue);
                } catch (IllegalAccessException | InvocationTargetException e) {
                    throw new ResourceException(
                            String.format("Exception while writting %s.%s=%s due to %s", resource, name, fieldValue, e.getMessage()), e);
                }
            }
        };
    }
}
项目:graphium    文件:DefaultSegmentXInfoDTO.java   
@JsonAnySetter
public void setValue(String name, Object value) {
    if (this.properties == null) {
        this.properties = new HashMap<>();
    }
    this.properties.put(name, value);
}
项目:smarti    文件:ConversationMeta.java   
@JsonAnySetter
public void setProperty(String key, List<String> values){
    if(CollectionUtils.isEmpty(values)){
        removeProperty(key);
    } else {
        properties.put(key, values);
    }
}
项目:echo    文件:Relationship.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:echo    文件:DataflowInput.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:echo    文件:Config.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:echo    文件:Property.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:echo    文件:Wiring.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:echo    文件:Catalog.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:echo    文件:Processor.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:xm-uaa    文件:TwitterObjectMixin.java   
@JsonAnySetter
abstract void add(String key, Object value);
项目:GitHub    文件:Jackson2Annotator.java   
@Override
public void anySetter(JMethod setter) {
    setter.annotate(JsonAnySetter.class);
}
项目:hibernate-ogm-redis    文件:HashEntity.java   
@JsonAnySetter
public void set(String name, String value) {
    properties.put( name, value );
}
项目:Reinickendorf_SER316    文件:UserstoryCustomAttribute.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:launcher-backend    文件:DtoSupport.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:actions-on-google-java    文件:Time.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:actions-on-google-java    文件:Date.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:actions-on-google-java    文件:DatetimeValue.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:actions-on-google-java    文件:Extension.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:actions-on-google-java    文件:Parameters.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:JavaRushTasks    文件:RealBean.java   
@JsonAnySetter
public void setAdditionalMap(String name, Object value) {
    additionalMap.put(name, value);
}
项目:nbawrapper-stats    文件:Latest.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:beadledom    文件:AdditionalPropertyModel.java   
@JsonAnySetter
public void setAdditionalProperties(String name, Object value) {
  this.additionalProperties.put(name, value);
}
项目:Reinickendorf_SER316    文件:Priority.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:nbawrapper-stats    文件:SortKey.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:nbawrapper-stats    文件:TeamStats.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:nbawrapper-stats    文件:Rebounds.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:TOSCAna    文件:ImageTags.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:TOSCAna    文件:Image.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:Reinickendorf_SER316    文件:EpicCustomAttribute.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:Reinickendorf_SER316    文件:AuthenticationContext.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:metamodel-membrane    文件:RestDataSourceDefinition.java   
@JsonAnySetter
public void set(final String name, final Object value) {
    properties.put(name, value);
}
项目:Equella    文件:AbstractExtendableBean.java   
@JsonAnySetter
public void set(String key, Object value)
{
    extras.put(key, value);
}
项目:Equella    文件:BaseEntityReference.java   
@JsonAnySetter
public void set(String key, Object value)
{
    extras.put(key, value);
}
项目:updatebot    文件:DtoSupport.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:nbawrapper-stats    文件:Stats.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:nbawrapper-stats    文件:RosterContainer.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:elasticsearch-client    文件:Hits.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}
项目:smarti    文件:ComponentConfiguration.java   
@JsonAnySetter
protected void setConfigParam(String name, Object value) {
    configuration.put(name, value);
}
项目:elasticsearch-client    文件:Shards.java   
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
    this.additionalProperties.put(name, value);
}