Remove confuse abstract method
This commit is contained in:
parent
0d6406226a
commit
f67be17d4c
|
|
@ -23,11 +23,9 @@ import net.bytebuddy.matcher.ElementMatcher;
|
|||
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
||||
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
|
||||
import static org.skywalking.apm.plugin.jdbc.define.Constants.CLOSE_METHOD_NAME;
|
||||
import static org.skywalking.apm.plugin.jdbc.define.Constants.COMMIT_METHOD_NAME;
|
||||
import static org.skywalking.apm.plugin.jdbc.define.Constants.CREATE_STATEMENT_INTERCEPT_CLASS;
|
||||
|
|
@ -139,10 +137,4 @@ public abstract class AbstractConnectionInstrumentation extends ClassInstanceMet
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override protected ClassMatch enhanceClass() {
|
||||
return byName(getEnhanceClass());
|
||||
}
|
||||
|
||||
public abstract String getEnhanceClass();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@
|
|||
|
||||
package org.skywalking.apm.plugin.jdbc.h2.define;
|
||||
|
||||
import org.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
|
||||
|
||||
/**
|
||||
* {@link JdbcConnectionInstrumentation} presents that skywalking intercepts {@link org.h2.jdbc.JdbcConnection}.
|
||||
*
|
||||
|
|
@ -26,7 +30,7 @@ package org.skywalking.apm.plugin.jdbc.h2.define;
|
|||
public class JdbcConnectionInstrumentation extends AbstractConnectionInstrumentation {
|
||||
public static final String ENHANCE_CLASS = "org.h2.jdbc.JdbcConnection";
|
||||
|
||||
@Override public String getEnhanceClass() {
|
||||
return ENHANCE_CLASS;
|
||||
@Override protected ClassMatch enhanceClass() {
|
||||
return byName(ENHANCE_CLASS);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@ package org.skywalking.apm.plugin.jdbc.h2.define;
|
|||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.any;
|
||||
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
|
||||
|
||||
/**
|
||||
* {@link JdbcXAConnectionInstrumentation} presents that skywalking intercepts {@link org.h2.jdbcx.JdbcXAConnection}.
|
||||
|
|
@ -48,7 +50,7 @@ public class JdbcXAConnectionInstrumentation extends AbstractConnectionInstrumen
|
|||
};
|
||||
}
|
||||
|
||||
@Override public String getEnhanceClass() {
|
||||
return ENHANCE_CLASS;
|
||||
@Override protected ClassMatch enhanceClass() {
|
||||
return byName(ENHANCE_CLASS);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,11 +21,14 @@ package org.skywalking.apm.plugin.jdbc.h2.define;
|
|||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.any;
|
||||
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
|
||||
|
||||
/**
|
||||
* {@link PooledJdbcConnectionInstrumentation} presents that skywalking intercepts {@link org.h2.jdbcx.JdbcXAConnection}.
|
||||
* {@link PooledJdbcConnectionInstrumentation} presents that skywalking intercepts {@link
|
||||
* org.h2.jdbcx.JdbcXAConnection}.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
@ -35,7 +38,7 @@ public class PooledJdbcConnectionInstrumentation extends AbstractConnectionInstr
|
|||
public static final String ENHANCE_CLASS = "org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection";
|
||||
|
||||
@Override protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
|
||||
return new ConstructorInterceptPoint[]{
|
||||
return new ConstructorInterceptPoint[] {
|
||||
new ConstructorInterceptPoint() {
|
||||
@Override public ElementMatcher<MethodDescription> getConstructorMatcher() {
|
||||
return any();
|
||||
|
|
@ -48,7 +51,7 @@ public class PooledJdbcConnectionInstrumentation extends AbstractConnectionInstr
|
|||
};
|
||||
}
|
||||
|
||||
@Override public String getEnhanceClass() {
|
||||
return ENHANCE_CLASS;
|
||||
@Override protected ClassMatch enhanceClass() {
|
||||
return byName(ENHANCE_CLASS);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue