Package com.changestuffs.shared.factory

Examples of com.changestuffs.shared.factory.MyAutoBeanFactory


@Singleton
public class DtoToJson {

  public String getJson(String body, String from, MessageType type){
    MyAutoBeanFactory beanFactory = AutoBeanFactorySource.create(MyAutoBeanFactory.class);
    MessageResponse response = new MessageResponse();
    response.setFrom(from);
    response.setMessage(body);
    response.setMessageType(type);
    AutoBean<IMessageResponse> bean = beanFactory.create(IMessageResponse.class, response);
    String json = AutoBeanCodex.encode(bean).getPayload();
    return json;
  }
View Full Code Here

TOP

Related Classes of com.changestuffs.shared.factory.MyAutoBeanFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.