Skip to content

Commit

Permalink
增加注释
Browse files Browse the repository at this point in the history
  • Loading branch information
y277an committed Jun 14, 2019
1 parent 586c719 commit b11d95e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class RpcFactory<T> implements InvocationHandler {

Logger logger = LoggerFactory.getLogger(this.getClass());

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Request request = new Request();
request.setClassName(method.getDeclaringClass().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public RpcFactoryBean() {
public RpcFactoryBean(Class<T> rpcInterface) {
this.rpcInterface = rpcInterface;
}

// 返回的对象实例
public T getObject() throws Exception {
return (T) Proxy.newProxyInstance(rpcInterface.getClassLoader(), new Class[]{rpcInterface}, factory);
}

// Bean的类型
public Class<?> getObjectType() {
return this.rpcInterface;
}
Expand Down

0 comments on commit b11d95e

Please sign in to comment.