public Object plugin(Object target) {
   if (target instanceof Executor) {
     return Plugin.wrap(target, this);
   } else {
     return target;
   }
 }
 @Override
 public Object plugin(Object target) {
   // 当目标类是StatementHandler类型时,才包装目标类,否者直接返回目标本身,减少目标被代理的次数
   if (target instanceof StatementHandler) {
     return Plugin.wrap(target, this);
   } else {
     return target;
   }
 }
 @Override
 public Object plugin(Object target) {
   if (target instanceof Executor
       || target instanceof StatementHandler
       || target instanceof ResultSetHandler) {
     return Plugin.wrap(target, this);
   } else {
     return target;
   }
 }
Beispiel #4
0
 public Object plugin(Object arg0) {
   return Plugin.wrap(arg0, this);
 }
Beispiel #5
0
 public Object plugin(Object arg0) {
   // TODO Auto-generated method stub
   return Plugin.wrap(arg0, this);
 }
 @Override
 public Object plugin(Object target) {
   return Plugin.wrap(target, this);
 }