package org.i3xx.util.ctree.impl;

import org.i3xx.util.ctree.core.EscapeResolver;
import org.i3xx.util.ctree.core.IResolveRaw;
import org.i3xx.util.ctree.core.IResolverFactory;
import org.i3xx.util.ctree.core.SimpleResolver;
import org.i3xx.util.ctree.linker.LinkedResolver;

public class LinkableResolverFactory implements IResolverFactory {
	
	public IResolveRaw defaultResolver;
	
	public LinkableResolverFactory() {
		defaultResolver = new SimpleResolver();
	}
	
	/* (non-Javadoc)
	 * @see com.i3xx.util.ctree.parser.IResolverFactory#getResolver(int)
	 */
	public IResolveRaw getResolver(int type) {
		switch(type){
		case TYPE_LINK:
			return new LinkedResolver();
		case TYPE_COPY:
			return new LinkedResolver();
		case TYPE_ESCAPE:
			return new EscapeResolver();
		case TYPE_DEFAULT:
			default:
				return defaultResolver;
		}
	}
}

@@ -275,16 +275,75 @@
 solver;%0D
+%0Aimport org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;%0D
 %0A%0D%0Apubli
@@ -404,24 +404,122 @@
 ctory %7B%0D%0A%09%0D%0A
+%09private static final Logger logger = LoggerFactory.getLogger(LinkableResolverFactory.class);%0D%0A%09%0D%0A
 %09public IRes
@@ -730,16 +730,16 @@
 %0D%0A%09 */%0D%0A
-
 %09public 
@@ -775,16 +775,120 @@
 ype) %7B%0D%0A
+%09%09%0D%0A%09%09if(logger.isTraceEnabled())%0D%0A%09%09%09logger.trace(%22The factory creates a type %7B%7D logger.%22, type);%0D%0A%09%09%0D%0A
 %09%09switch

Add a logging event