/*
Run a check of form bean classes that might not otherwise
be processed. A @FormBean instance will get processed by the
PageFlowCoreAnnotationProcessor and FormBeanChecker. Otherwise,
run the class through the FormBeanChecker for other possible errors.
515267
private void checkInnerClass(ClassDeclaration jclass)
            throws FatalCompileTimeException
    {
        boolean noFormBeanAnnotation = true;
        if (CompilerUtils.getAnnotation(jclass, FORM_BEAN_TAG_NAME, true) != null) {
            noFormBeanAnnotation = false;
        }
        else {
            //
            // check the methods for validatable property annotations that
            // would be processed elsewhere.
            //
            MethodDeclaration[] methods = CompilerUtils.getClassMethods(jclass, null);
            for (int i = 0; i < methods.length && noFormBeanAnnotation; i++) {
                MethodDeclaration method = methods[i];
                if (CompilerUtils.getAnnotation(method, VALIDATABLE_PROPERTY_TAG_NAME) != null) {
                    noFormBeanAnnotation = false;
                }
            }
        }

        if (noFormBeanAnnotation) {
            _formBeanChecker.check(jclass);
        }
    }
1316693
public void postProcessBeanFactory(final ConfigurableListableBeanFactory beanFactory) throws BeansException {

		if (beanFactory == null) {
			return;
		}

		String[] beanNames = beanFactory.getBeanDefinitionNames();
		int singletonBeanCount = 0;

		for (int i = 0; i < beanNames.length; i++) {
			// using beanDefinition to check singleton property because when
			// accessing through
			// context (applicationContext.isSingleton(beanName)), bean will be
			// created already,
			// possibly bypassing other BeanFactoryPostProcessors
			BeanDefinition beanDefinition = beanFactory.getBeanDefinition(beanNames[i]);

			if (beanDefinition.isSingleton()) {
				singletonBeanCount++;
			}

		}

		this.progressMonitor.taskStarted(this.loadingAppContextMessage, singletonBeanCount);

		beanFactory.addBeanPostProcessor(new ProgressMonitoringBeanPostProcessor(beanFactory));

	}
937663
private function dynamicFormCheck()
    {
        if ($this->field->hasDynamicForms()) {
            $this->dynamicFormParentName = $this->field->getName();
            $value = $this->field->getValue();
            $forms = $this->field->getDynamicForms();
            $this->includeDynamicFormJavascript = true;
            foreach ($forms as $dynamicTriggerValue => $form) {
                $this->dynamicFormVisible = ($value == $dynamicTriggerValue);
                $dynamicFields = $form->getFields();
                $this->processFields($dynamicFields, $dynamicTriggerValue);
            }
            unset($this->dynamicFormParentName);
        }
    }
349995
private List getFormBeanNames(TypeDeclaration beanType)
    {
        List formBeans = _strutsApp.getMatchingFormBeans(beanType, null);
        List formBeanNames = new ArrayList();

        for ( Iterator i = formBeans.iterator(); i.hasNext(); )
        {
            FormBeanModel formBeanModel = ( FormBeanModel ) i.next();
            formBeanNames.add( formBeanModel.getName() );
        }

        return formBeanNames;
    }
186507
private void finish() {
        try {
            GlobalEnablementBuilder globalEnablementBuilder = getBeanManager().getServices().get(GlobalEnablementBuilder.class);
            for (BeanRegistration registration : additionalBeans) {
                processBeanRegistration(registration, globalEnablementBuilder);
            }
            for (ObserverRegistration registration : additionalObservers) {
                processObserverRegistration(registration);
            }
        } catch (Exception e) {
            throw new DefinitionException(e);
        }
    }
1057609
public void processAnnotations(List<JCCompilationUnit> roots,
                                   Collection<String> classnames) {
        if (shouldStop(CompileState.PROCESS)) {
            // Errors were encountered.
            // Unless all the errors are resolve errors, the errors were parse errors
            // or other errors during enter which cannot be fixed by running
            // any annotation processors.
            if (unrecoverableError()) {
                deferredDiagnosticHandler.reportDeferredDiagnostics();
                log.popDiagnosticHandler(deferredDiagnosticHandler);
                return ;
            }
        }

        // ASSERT: processAnnotations and procEnvImpl should have been set up by
        // by initProcessAnnotations

        // NOTE: The !classnames.isEmpty() checks should be refactored to Main.

        if (!processAnnotations) {
            // If there are no annotation processors present, and
            // annotation processing is to occur with compilation,
            // emit a warning.
            if (options.isSet(PROC, "only")) {
                log.warning("proc.proc-only.requested.no.procs");
                todo.clear();
            }
            // If not processing annotations, classnames must be empty
            if (!classnames.isEmpty()) {
                log.error("proc.no.explicit.annotation.processing.requested",
                          classnames);
            }
            Assert.checkNull(deferredDiagnosticHandler);
            return ; // continue regular compilation
        }

        Assert.checkNonNull(deferredDiagnosticHandler);

        try {
            List<ClassSymbol> classSymbols = List.nil();
            List<PackageSymbol> pckSymbols = List.nil();
            if (!classnames.isEmpty()) {
                 // Check for explicit request for annotation
                 // processing
                if (!explicitAnnotationProcessingRequested()) {
                    log.error("proc.no.explicit.annotation.processing.requested",
                              classnames);
                    deferredDiagnosticHandler.reportDeferredDiagnostics();
                    log.popDiagnosticHandler(deferredDiagnosticHandler);
                    return ; // TODO: Will this halt compilation?
                } else {
                    boolean errors = false;
                    for (String nameStr : classnames) {
                        Symbol sym = resolveBinaryNameOrIdent(nameStr);
                        if (sym == null ||
                            (sym.kind == PCK && !processPcks) ||
                            sym.kind == ABSENT_TYP) {
                            if (sym != silentFail)
                                log.error(Errors.ProcCantFindClass(nameStr));
                            errors = true;
                            continue;
                        }
                        try {
                            if (sym.kind == PCK)
                                sym.complete();
                            if (sym.exists()) {
                                if (sym.kind == PCK)
                                    pckSymbols = pckSymbols.prepend((PackageSymbol)sym);
                                else
                                    classSymbols = classSymbols.prepend((ClassSymbol)sym);
                                continue;
                            }
                            Assert.check(sym.kind == PCK);
                            log.warning(Warnings.ProcPackageDoesNotExist(nameStr));
                            pckSymbols = pckSymbols.prepend((PackageSymbol)sym);
                        } catch (CompletionFailure e) {
                            log.error(Errors.ProcCantFindClass(nameStr));
                            errors = true;
                            continue;
                        }
                    }
                    if (errors) {
                        deferredDiagnosticHandler.reportDeferredDiagnostics();
                        log.popDiagnosticHandler(deferredDiagnosticHandler);
                        return ;
                    }
                }
            }
            try {
                annotationProcessingOccurred =
                        procEnvImpl.doProcessing(roots,
                                                 classSymbols,
                                                 pckSymbols,
                                                 deferredDiagnosticHandler);
                // doProcessing will have handled deferred diagnostics
            } finally {
                procEnvImpl.close();
            }
        } catch (CompletionFailure ex) {
            log.error("cant.access", ex.sym, ex.getDetailValue());
            if (deferredDiagnosticHandler != null) {
                deferredDiagnosticHandler.reportDeferredDiagnostics();
                log.popDiagnosticHandler(deferredDiagnosticHandler);
            }
        }
    }
1131475
@SuppressWarnings("unchecked")
    @Override
    public void run(Class<? extends Object> toRun, JobManager handler, Map<String, String> handlerParameters)
    {
        // initialize the spring context with all requested classes on first boot -
        // and only on first boot: the Spring context cannot be refreshed multiple times.
        if (!refreshed)
        {
            synchronized (AnnotationSpringContextBootstrapHandler.class)
            {
                if (!refreshed)
                {
                    // Add the different elements to the context path
                    if (handlerParameters.containsKey("beanNameGenerator"))
                    {
                        Class<? extends BeanNameGenerator> clazz;
                        try
                        {
                            clazz = (Class<? extends BeanNameGenerator>) AnnotationSpringContextBootstrapHandler.class.getClassLoader()
                                    .loadClass(handlerParameters.get("beanNameGenerator"));
                        }
                        catch (ClassNotFoundException e)
                        {
                            throw new RuntimeException("The handler beanNameGenerator class [" + handlerParameters.get("beanNameGenerator")
                                    + "] cannot be found.", e);
                        }

                        BeanNameGenerator generator;
                        try
                        {
                            generator = clazz.newInstance();
                        }
                        catch (Exception e)
                        {
                            throw new RuntimeException("The handler beanNameGenerator class [" + handlerParameters.get("beanNameGenerator")
                                    + "] was found but cannot be instantiated. Check it has a no-arguments constructor.", e);
                        }

                        ctx.setBeanNameGenerator(generator);
                    }

                    if (handlerParameters.containsKey("contextDisplayName"))
                    {
                        ctx.setDisplayName(handlerParameters.get("contextDisplayName"));
                    }

                    if (handlerParameters.containsKey("contextId"))
                    {
                        ctx.setId(handlerParameters.get("contextId"));
                    }

                    if (handlerParameters.containsKey("allowCircularReferences"))
                    {
                        boolean allow = Boolean.parseBoolean(handlerParameters.get("allowCircularReferences"));
                        ctx.setAllowCircularReferences(allow);
                    }

                    if (handlerParameters.containsKey("additionalScan"))
                    {
                        ctx.scan(handlerParameters.get("additionalScan").split(","));
                    }
                    else
                    {
                        ctx.register(toRun);
                    }

                    // Create a holder for the parameters.
                    BeanDefinition def = new RootBeanDefinition(HashMap.class);
                    def.setScope(THREAD_SCOPE_NAME);
                    ctx.registerBeanDefinition("runtimeParameters", def);

                    // This is a factory to retrieve the JobManager. We cannot just inject the JM, as it is created at runtime, long after
                    // the context has been created!
                    def = new RootBeanDefinition(JobManagerProvider.class);
                    def.setScope(BeanDefinition.SCOPE_SINGLETON);
                    ctx.registerBeanDefinition("jobManagerProvider", def);

                    // It would however be possible to use a lazy bean injection. But this would require the user to put @Lazy everywhere,
                    // or else the result is null... Too fragile. The provider/factory pattern above does the same thing and forces the user
                    // to do a lazy call.
                    // def = new RootBeanDefinition(JobManager.class);
                    // def.setScope(RootBeanDefinition.SCOPE_PROTOTYPE);
                    // def.setLazyInit(true);
                    // def.setFactoryBeanName("jobManagerProvider");
                    // def.setFactoryMethodName("getObject");
                    // ctx.registerBeanDefinition("jobManager", def);

                    // Go: this initializes the context
                    ctx.refresh();
                    refreshed = true;
                }
            }
        }
    }
1020277
public boolean processSecondRound(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
		for (SQLiteDatabaseSchema schema : schemas) {

			// Analyze beans BEFORE daos, because beans are needed for DAO
			// definition
			for (String daoName : schema.getDaoNameSet()) {
				// check dao into bean definition
				if (globalDaoGenerated.contains(daoName)) {
					createSQLEntityFromDao(schema, schema.getElement(), daoName);
					createSQLDaoDefinition(schema, globalBeanElements, globalDaoElements, daoName);
				}
			} // end foreach bean

		} // end foreach dataSource

		return true;
	}
1352030
protected void beanDefinitionCheck() {
        for (int i = 0; i < beanDefinitions.size(); i++) {
            for (int j = i + 1; j < beanDefinitions.size(); j++) {
                BeanDefinition b1 = beanDefinitions.get(i);
                BeanDefinition b2 = beanDefinitions.get(j);

                // Two components' id are equal
                if (VerifyUtils.isNotEmpty(b1.getId())
                        && VerifyUtils.isNotEmpty(b2.getId())
                        && b1.getId().equals(b2.getId())) {
                    error("Duplicated bean ID of " + b1.getClassName() + " and " + b2.getClassName());
                }

                if (b1.getClassName().equals(b2.getClassName())) {
                    // Two components' class name are equal, but one of them does not set id.
                    if (VerifyUtils.isEmpty(b1.getId()) || VerifyUtils.isEmpty(b2.getId())) {
                        error("Duplicated class definition. Please set a ID for " + b1.getClassName());
                    } else {
                        // Their id are different, save them to memo.
                        // When the component is injecting by type, throw an exception.
                        errorMemo.add(b1.getClassName());
                    }
                }

                for (String iname1 : b1.getInterfaceNames()) {
                    for (String iname2 : b2.getInterfaceNames()) {
                        if (iname1.equals(iname2)) {
                            // Two components' interface name are equal, but one of them does not set id.
                            if (VerifyUtils.isEmpty(b1.getId()) || VerifyUtils.isEmpty(b2.getId())) {
                                error("Duplicated class definition. Please set a ID for " + b1.getClassName());
                            } else {
                                // Their id are different, save them to memo.
                                // When the component is injecting by type, throw an exception.
                                errorMemo.add(iname1);
                            }
                        }
                    }
                }

            }
        }
    }
1073575
@Override
	public boolean process(Set<? extends TypeElement> elements,
			RoundEnvironment environment) {
		Messager messager = processingEnv.getMessager();
		
		for (TypeElement element : elements) {
			Set<? extends Element> elementsAnnotatedWith = environment.getElementsAnnotatedWith(element);
			
			for (Element elementAnnotatedWith : elementsAnnotatedWith) {
				TypeElement typeElement = (TypeElement) elementAnnotatedWith;
				EntityValidator validator = new EntityValidator(processingEnv.getTypeUtils());
				List<Problem> problems = validator.validate(typeElement);
				
//				for (Problem problem : problems) {
//					System.out.println(problem);
//				}
				
				boolean error = false;
				
				for (Problem problem : problems) {
					if (problem.kind() == Kind.ERROR) {
						error = true;
					}
					
					messager.printMessage(problem.kind(), problem.message(), problem.element());
				}
				
				if (!error) {
					MetamodelSource source = new MetamodelSource(typeElement, processingEnv);
					
					try {
						source.save();
					} catch (Exception e) {
						messager.printMessage(Kind.ERROR, "Metamodel ["
								+ source.toMetamodelName(typeElement.getQualifiedName().toString())
								+ "] cannot be saved due to [" + e + "]",
								typeElement);
						e.printStackTrace();
					}
				}
			}
		}
		
		return true;
	}
343347
public function run()
    {

        // register the default autoloader
        require SERVER_AUTOLOADER;

        // register shutdown handler
        register_shutdown_function(array(&$this, "shutdown"));

        // we need to register the class loaders again
        $application = $this->application;
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // add the application instance to the environment
        Environment::singleton()->setAttribute(EnvironmentKeys::APPLICATION, $application);

        // create s simulated request/session ID whereas session equals request ID
        Environment::singleton()->setAttribute(EnvironmentKeys::SESSION_ID, $sessionId = SessionUtils::generateRandomString());
        Environment::singleton()->setAttribute(EnvironmentKeys::REQUEST_ID, $sessionId);

        // load application and message instance
        $message = $this->message;

        try {
            // create an intial context instance
            $initialContext = new InitialContext();
            $initialContext->injectApplication($application);

            // load the callbacks for the actual message state
            foreach ($message->getCallbacks($message->getState()) as $callback) {
                // explode the lookup + method name
                list ($lookupName, $methodName) = $callback;
                // lookup the bean instance and invoke the callback
                call_user_func(array($initialContext->lookup($lookupName), $methodName), $message);
            }

        } catch (\Exception $e) {
            \error($e->__toString());
        }
    }
241201
@Override
	public Object postProcessBeforeInitialization(final Object bean, final String beanName) throws BeansException {
		if (bean instanceof EventSubscriber) {
			Subscribe annotation = getAnnotation(bean.getClass(), beanName);
			if (annotation != null) {
				subscribers.put(beanName, annotation);
			}
		}
		return bean;
	}
220834
public void process() throws ConstraintException
    {
        ClassDescriptorDef otherClassDef;
        
        for (Iterator it = getDirectBaseTypes(); it.hasNext();)
        {
            otherClassDef = (ClassDescriptorDef)it.next();
            if (!otherClassDef.hasBeenProcessed())
            {
                otherClassDef.process();
            }
        }
        for (Iterator it = getNested(); it.hasNext();)
        {
            otherClassDef = ((NestedDef)it.next()).getNestedType();
            if (!otherClassDef.hasBeenProcessed())
            {
                otherClassDef.process();
            }
        }
        
        ArrayList               newFields      = new ArrayList();
        ArrayList               newReferences  = new ArrayList();
        ArrayList               newCollections = new ArrayList();
        FieldDescriptorDef      newFieldDef;
        ReferenceDescriptorDef  newRefDef;
        CollectionDescriptorDef newCollDef;
        
        // adding base features
        if (getBooleanProperty(PropertyHelper.OJB_PROPERTY_INCLUDE_INHERITED, true))
        {
            ArrayList baseTypes = new ArrayList();
            DefBase   featureDef;
            
            addRelevantBaseTypes(this, baseTypes);
            for (Iterator it = baseTypes.iterator(); it.hasNext();)
            {
                cloneInheritedFeatures((ClassDescriptorDef)it.next(), newFields, newReferences, newCollections);
            }

            for (Iterator it = newFields.iterator(); it.hasNext();)
            {
                newFieldDef = (FieldDescriptorDef)it.next();
                featureDef  = getFeature(newFieldDef.getName());
                if (featureDef != null)
                {    
                    if (!getBooleanProperty(PropertyHelper.OJB_PROPERTY_IGNORE, false))
                    {
                        // we have the implicit constraint that an anonymous field cannot redefine/be redefined
                        // except if it is ignored
                        if ("anonymous".equals(featureDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS)))
                        {
                            throw new ConstraintException("The anonymous field "+featureDef.getName()+" in class "+getName()+" overrides an inherited field");
                        }
                        if ("anonymous".equals(newFieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS)))
                        {
                            throw new ConstraintException("The inherited anonymous field "+newFieldDef.getName()+" is overriden in class "+getName());
                        }
                    }
                    LogHelper.warn(true, ClassDescriptorDef.class, "process", "Class "+getName()+" redefines the inherited field "+newFieldDef.getName());
                    it.remove();
                }
            }
            for (Iterator it = newReferences.iterator(); it.hasNext();)
            {
                newRefDef = (ReferenceDescriptorDef)it.next();
                if ("super".equals(newRefDef.getName()))
                {
                    // we don't inherit super-references
                    it.remove();
                }
                else if (hasFeature(newRefDef.getName()))
                {
                    LogHelper.warn(true, ClassDescriptorDef.class, "process", "Class "+getName()+" redefines the inherited reference "+newRefDef.getName());
                    it.remove();
                }
            }
            for (Iterator it = newCollections.iterator(); it.hasNext();)
            {
                newCollDef = (CollectionDescriptorDef)it.next();
                if (hasFeature(newCollDef.getName()))
                {
                    LogHelper.warn(true, ClassDescriptorDef.class, "process", "Class "+getName()+" redefines the inherited collection "+newCollDef.getName());
                    it.remove();
                }
            }
        }
        // adding nested features
        for (Iterator it = getNested(); it.hasNext();)
        {
            cloneNestedFeatures((NestedDef)it.next(), newFields, newReferences, newCollections);
        }
        _fields.addAll(0, newFields);
        _references.addAll(0, newReferences);
        _collections.addAll(0, newCollections);
        sortFields();
        _hasBeenProcessed = true;
    }
620546
public int doStartTag() throws JspException
    {
        if (hasErrors())
            return SKIP_BODY;
        
        // Error out if there is a parent form
        if (getNearestForm() != null) {
            registerTagError(Bundle.getString("Tags_FormParentForm"), null);
        }

        // Look up the form bean name, scope, and type if necessary
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        ServletContext servletContext = pageContext.getServletContext();

        // find the beanName, beanType and beanScope
        lookupBeanScopeAndName(request, servletContext);
        if (hasErrors())
            return SKIP_BODY;

        // Generate the real name.  We generate it here so we can return it to any contained tags if
        // they need it.  If they access it, the most likely will cause the realName to be output
        if (_state.id != null) {
            _realName = getIdForTagId(_state.id);
        }
        else {
            String formId = FORM_ID + getNextId(request);
            _realName = getIdForTagId(formId);
        }

        // Store this tag itself as a page attribute
        pageContext.setAttribute(Constants.FORM_KEY, this, PageContext.REQUEST_SCOPE);

        // Locate or create the bean associated with our form
        int scope = PageContext.SESSION_SCOPE;
        if ("request".equals(_beanScope)) {
            scope = PageContext.REQUEST_SCOPE;
        }

        // setup the Bean
        Object bean = null;
        if (_beanName != null)
            bean = pageContext.getAttribute(_beanName, scope);
        if (bean == null) {
            if (_explicitBeanType) {
                // Backwards compatibility - use explicitly specified values
                try {
                    Handlers handlers = Handlers.get(pageContext.getServletContext());
                    bean = handlers.getReloadableClassHandler().newInstance(_beanType);
                    if (bean != null) {
                        ((ActionForm) bean).setServlet(_servlet);
                    }
                }
                catch (Exception e) {
                    registerTagError(Bundle.getString("Tags_FormNameBadType"), e);
                }
            }
            else {
                // New and improved - use the values from the action mapping
                
                // First, check to see if this is a page flow-scoped form bean.  If so, use the current value
                // from the member field in the page flow (or shared flow).
                if (_flowController != null) {
                    bean = _flowController.getFormBean(_mapping);
                }

                if (bean == null) {
                    bean = InternalUtils.createActionForm(_mapping, _appConfig, _servlet, servletContext);
                }
            }

            if (hasErrors())
                return SKIP_BODY;

            // Call the reset method if we have an ActionForm
            if (bean instanceof ActionForm) {
                ((ActionForm) bean).reset(_mapping, request);
            }
            if (bean != null) {
                pageContext.setAttribute(_beanName, bean, scope);
            }
        }
        if (bean != null) {
            pageContext.setAttribute(Constants.BEAN_KEY, bean, PageContext.REQUEST_SCOPE);
            ImplicitObjectUtil.loadActionForm(pageContext, bean);
        }
        
        // Create the action URL here, so child tags can access it.
        try {
            HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
            _extraHiddenParams = new LinkedHashMap/*<String, List<String>>*/();
            _actionUrl = rewriteActionURL(servletContext, request, response, _extraHiddenParams);
        }
        catch (URISyntaxException e) {
            // report the error...
            logger.error(Bundle.getString("Tags_URISyntaxException"));
            String s = Bundle.getString("Tags_Form_URLException",
                    new Object[]{_state.action, e.getMessage()});
            registerTagError(s, e);
        }

        // Continue processing this page
        return EVAL_BODY_BUFFERED;
    }
799490
function (bp) {
                var noerrors = true;

                // bean definition will be available in the waiting beans
                var def = this.__waitingBeans[bp];
                delete this.__waitingBeans[bp];

                this.$assert(58, def);

                var compiled = def.$compiled;
                if (compiled) {
                    def.$beans = compiled(registerBean(def.$package), getBean, require("./JsonTypesCheck").fastNormalizers);
                } else {
                    // validate incoming definition
                    if (this._options.checkBeans && this.__loadedBeans[this._BEANS_SCHEMA_PACKAGE]) {
                        var bean = this._getBean(this._BEANS_SCHEMA_PACKAGE + '.Package');
                        this.$assert(428, bean != null);
                        noerrors = noerrors && this.__logAllErrors(this._processJsonValidation({
                            beanDef : bean,
                            json : def
                        }));
                    }

                    // do not add defaults to default values (to be consistent with fast normalization)
                    this._options.addDefaults = false;
                    noerrors = noerrors && this.__logAllErrors(this.__preprocessBP(def));
                }
                if (noerrors) {
                    this.__loadedBeans[bp] = def;
                    return def;
                } else {
                    throw new Error("Error while loading " + bp);
                }
            }
1101289
@Override
	public boolean validate(Object value) {
		if(constraints == null) {
			return false;
		}

		IConstraintChecker checker;
		for(BeanProperty constraint : constraints) {
			checker = checkers.get(constraint.getPropertyName());
			if(checker == null) {
				throw new RuntimeException("No checker found for constraint "
						+ "'" + constraint.getPropertyName() + "'"
				);
			}
			checker.check(value, constraint);
		}
		return true;
	}
960951
@Override
	public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
		try {
			count++;
			if (count == 1) {

				many2ManyProcessor.clear();
				typeProcessor.clear();
				sharedPreferencesProcessor.clear();
				dataSourceProcessor.clear();

				// generate @BindGeneratedDao
				many2ManyProcessor.process(annotations, roundEnv);

				// generate bindmap
				typeProcessor.process(annotations, roundEnv);

				sharedPreferencesProcessor.process(annotations, roundEnv);
				sharedPreferencesProcessor.generateClasses();

				dataSourceProcessor.generatedEntities = many2ManyProcessor.result.value0;
				dataSourceProcessor.generatedDaos = many2ManyProcessor.result.value1;
				// dump(1, roundEnv);
				dataSourceProcessor.analyzeRound(annotations, roundEnv);
				dataSourceProcessor.process(annotations, roundEnv);
				dataSourceProcessor.generateClasses(roundEnv);
			} else if (count == 2) {
				dataSourceProcessor.analyzeSecondRound(annotations, roundEnv);
				dataSourceProcessor.processSecondRound(annotations, roundEnv);
				dataSourceProcessor.generateClassesSecondRound(roundEnv);
			}

			return true;
		} catch (Throwable e) {
			String msg = StringUtils.nvl(e.getMessage());
			error(null, e.getClass().getCanonicalName() + ": " + msg);

			if (DEBUG_MODE) {
				if (JUNIT_TEST_MODE) {
					logger.log(Level.SEVERE, msg);
					//e.printStackTrace();
				} else {
					StackTraceElement[] stackTrace = e.getStackTrace();
					for (StackTraceElement item : stackTrace) {
						error(null, String.format("\tat %s.%s(%s:%s)", item.getClassName(), item.getMethodName(), item.getFileName(), item.getLineNumber()));
					}					
				}
			}
			return false;
		}

	}