use of org.jboss.tools.hibernate.runtime.common.AbstractHbm2DDLExporterFacade in project jbosstools-hibernate by jbosstools.
the class Hbm2DDLExporterFacadeTest method setUp.
@Before
public void setUp() throws Exception {
ProxyFactory proxyFactory = new ProxyFactory();
proxyFactory.setSuperclass(Hbm2DDLExporter.class);
Class<?> proxyClass = proxyFactory.createClass();
hbm2ddlExporter = (Hbm2DDLExporter) proxyClass.newInstance();
((ProxyObject) hbm2ddlExporter).setHandler(new MethodHandler() {
@Override
public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Throwable {
if (methodName == null) {
methodName = m.getName();
}
if (arguments == null) {
arguments = args;
}
return proceed.invoke(self, args);
}
});
hbm2DDLExporterFacade = new AbstractHbm2DDLExporterFacade(FACADE_FACTORY, hbm2ddlExporter) {
};
reset();
}
use of org.jboss.tools.hibernate.runtime.common.AbstractHbm2DDLExporterFacade in project jbosstools-hibernate by jbosstools.
the class Hbm2DDLExporterFacadeTest method setUp.
@Before
public void setUp() throws Exception {
ProxyFactory proxyFactory = new ProxyFactory();
proxyFactory.setSuperclass(Hbm2DDLExporter.class);
Class<?> proxyClass = proxyFactory.createClass();
hbm2ddlExporter = (Hbm2DDLExporter) proxyClass.newInstance();
((ProxyObject) hbm2ddlExporter).setHandler(new MethodHandler() {
@Override
public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Throwable {
if (methodName == null) {
methodName = m.getName();
}
if (arguments == null) {
arguments = args;
}
return proceed.invoke(self, args);
}
});
hbm2DDLExporterFacade = new AbstractHbm2DDLExporterFacade(FACADE_FACTORY, hbm2ddlExporter) {
};
reset();
}
use of org.jboss.tools.hibernate.runtime.common.AbstractHbm2DDLExporterFacade in project jbosstools-hibernate by jbosstools.
the class Hbm2DDLExporterFacadeTest method setUp.
@Before
public void setUp() throws Exception {
ProxyFactory proxyFactory = new ProxyFactory();
proxyFactory.setSuperclass(Hbm2DDLExporter.class);
Class<?> proxyClass = proxyFactory.createClass();
hbm2ddlExporter = (Hbm2DDLExporter) proxyClass.newInstance();
((ProxyObject) hbm2ddlExporter).setHandler(new MethodHandler() {
@Override
public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Throwable {
if (methodName == null) {
methodName = m.getName();
}
if (arguments == null) {
arguments = args;
}
return proceed.invoke(self, args);
}
});
hbm2DDLExporterFacade = new AbstractHbm2DDLExporterFacade(FACADE_FACTORY, hbm2ddlExporter) {
};
reset();
}
use of org.jboss.tools.hibernate.runtime.common.AbstractHbm2DDLExporterFacade in project jbosstools-hibernate by jbosstools.
the class Hbm2DDLExporterFacadeTest method before.
@BeforeEach
public void before() {
ddlExporterTarget = new Hbm2DDLExporter();
ddlExporterFacade = new AbstractHbm2DDLExporterFacade(FACADE_FACTORY, ddlExporterTarget) {
};
}
use of org.jboss.tools.hibernate.runtime.common.AbstractHbm2DDLExporterFacade in project jbosstools-hibernate by jbosstools.
the class Hbm2DDLExporterFacadeTest method setUp.
@Before
public void setUp() throws Exception {
Enhancer enhancer = new Enhancer();
enhancer.setSuperclass(Hbm2DDLExporter.class);
enhancer.setCallback(new MethodInterceptor() {
@Override
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
if (methodName == null) {
methodName = method.getName();
}
if (arguments == null) {
arguments = args;
}
return proxy.invokeSuper(obj, args);
}
});
hbm2ddlExporter = (Hbm2DDLExporter) enhancer.create();
hbm2DDLExporterFacade = new AbstractHbm2DDLExporterFacade(FACADE_FACTORY, hbm2ddlExporter) {
};
reset();
}
Aggregations