private JDefinedClass createServicesMethodSendClassArgsStandardSchemeFactory(JDefinedClass _class, List<JVar> list) throws JClassAlreadyExistsException { JDefinedClass standardSchemeClass = createServicesMethodSendClassArgsStandardScheme(_class, list); JDefinedClass factoryClass = _class._class(JMod.PUBLIC|JMod.STATIC, _class.name() + STANDARD_SCHEME + "Factory")._implements(SchemeFactory.class); JMethod method = factoryClass.method(JMod.PUBLIC, standardSchemeClass, "getScheme"); method.body()._return(JExpr._new(standardSchemeClass)); return factoryClass; }
public void read(TProtocol iprot) throws TException { ((SchemeFactory)schemes.get(iprot.getScheme())).getScheme().read(iprot, this); }
public void write(TProtocol oprot) throws TException { ((SchemeFactory)schemes.get(oprot.getScheme())).getScheme().write(oprot, this); }
private JDefinedClass createServicesMethodSendClassArgsTupleSchemeFactory(JDefinedClass _class, List<JVar> list) throws JClassAlreadyExistsException { JDefinedClass tupleSchemeClass = createServicesMethodSendClassArgsTupleScheme(_class, list); JDefinedClass factoryClass = _class._class(JMod.PUBLIC | JMod.STATIC, _class.name() + TUPLE_SCHEME + "Factory")._implements(SchemeFactory.class); JMethod method = factoryClass.method(JMod.PUBLIC, tupleSchemeClass, "getScheme"); method.body()._return(JExpr._new(tupleSchemeClass)); return factoryClass; }