Method m = Context.getCurrentThreadContext().getConfiguration().isCacheEnable() ? MethodCache.get(declaration) : null;
if (m == null) {
Object instance = retrieveInstance(declaration);
m = findSnippetMethod(instance, declaration.getSnippetHandler());
if (m == null) {
throw new SnippetNotResovlableException("Snippet handler cannot be resolved for " + declaration);
}
// we do not mind that the exited method instance would be
// overrode in multi-threads environment
MethodCache.put(declaration, m);
}