Package org.gwtoolbox.commons.generator.rebind

Examples of org.gwtoolbox.commons.generator.rebind.EasyTreeLogger


*/
public class BeanInfoRegistryGenerator extends Generator {

    public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {
        try {
            LoggingUtils.setLogger(new EasyTreeLogger(logger));
            return doGenerate(logger, context, typeName);
        } catch (Exception e) {
            logger.log(TreeLogger.ERROR, null, e);
            throw new UnableToCompleteException();
        } finally {
View Full Code Here


        }
    }

    public String doGenerate(TreeLogger logger, GeneratorContext context, String typeName) throws Exception {

        EasyTreeLogger easyLogger = new EasyTreeLogger(logger);

        JClassType type = context.getTypeOracle().findType(typeName);
        String packageName = type.getPackage().getName();
        String simpleName = type.getSimpleSourceName();
View Full Code Here

            for (JPackage currentPackage : allPackages) {
                logger.debug("Scanning package '" + currentPackage.getName() + "'...");
                if (!pattern.matcher(currentPackage.getName()).matches()) {
                    continue;
                }
                EasyTreeLogger packageLogger = logger.branchInfo("Scanning package '" + currentPackage.getName() + "'");
                scanPackage(packageLogger, context, beanSelector, currentPackage, beanTypes);
            }
        }
        return beanTypes;
    }
View Full Code Here

        if (sourceWriter == null) {
            return qualifiedBeanClassName;
        }

        typeRegistryThreadLocal.set(new HashSet<String>());
        write(new EasyTreeLogger(logger), sourceWriter, context, beanType, className);
        typeRegistryThreadLocal.remove();
        sourceWriter.commit(logger);
        return qualifiedBeanClassName;
    }
View Full Code Here

    protected final EasyTreeLogger logger;
    protected final GeneratorContext generatorContext;

    public AbstractComponentContainerOracleBuilder(TreeLogger logger, GeneratorContext generatorContext) {
        this.logger = new EasyTreeLogger(logger);
        this.generatorContext = generatorContext;
    }
View Full Code Here

            for (JPackage currentPackage : allPackages) {
                logger.debug("Processing package '" + currentPackage.getName() + "'...");
                if (!pattern.matcher(currentPackage.getName()).matches()) {
                    continue;
                }
                EasyTreeLogger packageLogger = logger.branchInfo("Scanning package '" + currentPackage.getName() + "'");
                processPackage(packageLogger, oracle, context, currentPackage);
            }
        }
    }
View Full Code Here

    public void setLogger(EasyTreeLogger logger) {
        this.logger = logger;
    }

    public final void init(T t, JClassType containerType, GeneratorContext context) throws ProcessorInitializationException {
        EasyTreeLogger newLogger = logger.branchInfo("Initializing processor '" + getClass().getName() + "'...");
        order = new AnnotationWrapper(t).getInt("order", order);
        if (newLogger.debugEnabled()) {
            newLogger.debug("Order: " + order);
        }
        doInit(newLogger, t, containerType, context);
    }
View Full Code Here

        doInit(newLogger, t, containerType, context);
    }


    public final void process(MutableComponentContainerOracle oracle, GeneratorContext context) throws Exception {
        EasyTreeLogger newLogger = logger.branchInfo("Processing processor '" + getClass().getName() + "'...");
        doProcess(newLogger, oracle, context);
    }
View Full Code Here

                        addEventTypes(pkg, eventTypes, eventType);
                    }
                }
            }
        }
        return generate(new EasyTreeLogger(logger), type, eventTypes, context);
    }
View Full Code Here

        componentIds = new ArrayList<String>();
        constantNames = new ArrayList<String>();
        typeNameByMethodName = new HashMap<String, ComponentTypeReferenceValue>();

        try {
            return doGenerate(new EasyTreeLogger(logger), context, typeName);
        } catch (Exception e) {
            logger.log(TreeLogger.ERROR, null, e);
            throw new UnableToCompleteException();
        } finally {
            // cleaning up
View Full Code Here

TOP

Related Classes of org.gwtoolbox.commons.generator.rebind.EasyTreeLogger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.