Example usage for com.rabbitmq.tools.json JSONUtil tryFill

List of usage examples for com.rabbitmq.tools.json JSONUtil tryFill

Introduction

In this page you can find the example usage for com.rabbitmq.tools.json JSONUtil tryFill.

Prototype

public static void tryFill(Object target, Map<String, Object> source) 

Source Link

Document

Ignores reflection exceptions while using reflection to fill public fields and Bean properties of the target object from the source Map.

Usage

From source file:org.fortiss.smg.remoteframework.lib.jsonrpc.ParameterDescription.java

License:Mozilla Public License

public ParameterDescription(Map<String, Object> pm) {
    JSONUtil.tryFill(this, pm);
}

From source file:org.fortiss.smg.remoteframework.lib.jsonrpc.ProcedureDescription.java

License:Mozilla Public License

public ProcedureDescription(Map<String, Object> pm) {
    JSONUtil.tryFill(this, pm);

    @SuppressWarnings("unchecked")
    List<Map<String, Object>> p = (List<Map<String, Object>>) pm.get("params");
    params = new ParameterDescription[p.size()];
    int count = 0;
    for (Map<String, Object> param_map : p) {
        ParameterDescription param = new ParameterDescription(param_map);
        params[count++] = param;// ww  w. ja v a  2 s . c o m
    }
}

From source file:org.fortiss.smg.remoteframework.lib.jsonrpc.ServiceDescription.java

License:Mozilla Public License

public ServiceDescription(Map<String, Object> rawServiceDescription) {
    JSONUtil.tryFill(this, rawServiceDescription);
}