It is my bad I failed to explain it. The constructor **ConsumerModel** takes 5 parameter where **methods** and **attributes are** are getting used if and only if **proxyObject ** is not null. So if **proxyObject ** is null then rest of the two methods and attributes are not getting used. So to keep it simple I was saying we can have two constructor
1. `public ConsumerModel(String serviceName, Class<?> serviceInterfaceClass)` 2. ` public ConsumerModel(String serviceName, Class<?> serviceInterfaceClass, Object proxyObject, Method[] methods, Map<String, Object> attributes)` So using constructor definition it will be easy to understand by the user that object created using constructor **1** does not deal with proxy object, methods and attributes, object populated with these 3 parameter will be null or empty. Where if someone populate object using constructor **2** will be dealing with rest of the parameters and explicitly throw exception of **proxyObject** is null. Do let me know if I am able to explain the scenario or whether it make sense or not to consider this. [ Full content available at: https://github.com/apache/incubator-dubbo/pull/3013 ] This message was relayed via gitbox.apache.org for [email protected]
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
