private static final Lock CACHE_LOCK = new ReentrantLock();
private static final Collection<String> SKIP_PROPERTIES = Arrays.asList("class", "metaClass", "conventionMapping", "convention", "asDynamicObject", "extensions");
public <T> T newInstance(Class<T> type, Object... parameters) {
Instantiator instantiator = new DirectInstantiator();
return instantiator.newInstance(generate(type), parameters);
}
public <T> Class<? extends T> generate(Class<T> type) {
try {
CACHE_LOCK.lock();