test_class.file: cglib/src/test/java/org/microbule/cglib/CglibDynamicProxyStrategyTest.java
test_class.identifier: CglibDynamicProxyStrategyTest
test_class.superclass: extends MockObjectTestCase
test_case.body: @Test
      public void testRegularMethodCall() {
          final CglibDynamicProxyStrategy strategy = new CglibDynamicProxyStrategy();
          final HelloService proxy1 = strategy.createDynamicProxy(HelloService.class, HelloServiceImpl::new, "my description");
          assertEquals("Hello, Microbule!", proxy1.sayHello("Microbule"));
      }
test_case.class_method_signature: CglibDynamicProxyStrategyTest.testRegularMethodCall()
test_case.full_signature: @Test public void testRegularMethodCall()
test_case.identifier: testRegularMethodCall
test_case.invocations: createDynamicProxy assertEquals sayHello
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRegularMethodCall()
focal_class.declarator: FILTER = method -> {
          if (DynamicProxyUtils.isEqualsMethod(method)) {
              return 1;
          } else if (DynamicProxyUtils.isHashCodeMethod(method)) {
              return 2;
          } else if (DynamicProxyUtils.isToStringMethod(method)) {
              return 3;
          } else {
              return 0;
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final CallbackFilter FILTER = method -> {
          if (DynamicProxyUtils.isEqualsMethod(method)) {
              return 1;
          } else if (DynamicProxyUtils.isHashCodeMethod(method)) {
              return 2;
          } else if (DynamicProxyUtils.isToStringMethod(method)) {
              return 3;
          } else {
              return 0;
          }
      };
focal_class.type: CallbackFilter
focal_class.var_name: FILTER
focal_class.file: cglib/src/main/java/org/microbule/cglib/CglibDynamicProxyStrategy.java
focal_class.identifier: CglibDynamicProxyStrategy
focal_class.interfaces: implements JaxrsDynamicProxyStrategy
focal_class.class_method_signature: CglibDynamicProxyStrategy.createDynamicProxy(Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)
focal_class.full_signature: @Override public T createDynamicProxy(Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)
focal_class.identifier: createDynamicProxy
focal_class.modifiers: @Override public
focal_class.parameters: (Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)
focal_class.return: T
focal_class.signature: T createDynamicProxy(Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)
focal_method.body: @Override
      public <T> T createDynamicProxy(Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams) {
          final String description = String.format(descriptionPattern, descriptionParams);
          final Enhancer enhancer = new Enhancer();
          enhancer.setClassLoader(new DelegatingClassLoader(type.getClassLoader(), Enhancer.class.getClassLoader()));
          enhancer.setInterfaces(new Class[]{type});
          enhancer.setSuperclass(Object.class);
          enhancer.setCallbackFilter(FILTER);
          enhancer.setCallbacks(new Callback[]{
                  (Dispatcher) targetSupplier::get,
                  (MethodInterceptor) (proxy, method, params, methodProxy) -> proxy == params[0],
                  (MethodInterceptor) (proxy, method, params, methodProxy) -> System.identityHashCode(proxy),
                  (MethodInterceptor) (proxy, method, params, methodProxy) -> description
          });
          return type.cast(enhancer.create());
      }
focal_method.class_method_signature: CglibDynamicProxyStrategy.createDynamicProxy(Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)
focal_method.full_signature: @Override public T createDynamicProxy(Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)
focal_method.identifier: createDynamicProxy
focal_method.invocations: format setClassLoader getClassLoader getClassLoader setInterfaces setSuperclass setCallbackFilter setCallbacks identityHashCode cast create
focal_method.modifiers: @Override public
focal_method.parameters: (Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)
focal_method.return: T
focal_method.signature: T createDynamicProxy(Class<T> type, Supplier<T> targetSupplier, String descriptionPattern, Object... descriptionParams)