private final static Logger logger = LoggerFactory.getLogger(TransformerFactory.class);
public final static Transformer<?> generateTransformer(Object action) {
Transformer<?> transformer;
if (action == null && treatNullAsRemoveNode) {
transformer = new ElementRemover();
} else if (action instanceof Renderer) {
// most of list rendering will return a list of Renderer, so put it at the first place
transformer = new RendererTransformer((Renderer) action);
} else if (action instanceof SpecialRenderer) {
transformer = SpecialRenderer.retrieveTransformer((SpecialRenderer) action);