@Override public JvmDeclaredType createType(Class<?> clazz) { try { JvmDeclaredType cachedResult = typeCache.get(clazz); // the cached result contains proxies and is not // contained in a resource set. clone it since the // client of #createClass will usually put the result // into a resource and perform proxy resolution afterwards // in the context of a single resource set. return EcoreUtil2.cloneWithProxies(cachedResult); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug(e.getMessage(), e); } return delegate.createType(clazz); } }
public CachingDeclaredTypeFactory(DeclaredTypeFactory delegate) { super(delegate.getUriHelper()); this.delegate = delegate; }
public JvmDeclaredType apply(Class<?> key) { if (log.isDebugEnabled()) log.debug("Hit:" + key.getCanonicalName()); return delegate.createType(key); }