PostCondition: rootClassSource == null
480489
protected void doScanReferenceClasses() throws AnnotationTargets_Exception {
        if (haveScannedReferencedClasses) {
            return;
        }

        try {
            doScanDirectClasses();

        } catch (AnnotationTargets_Exception e) {
            haveScannedReferencedClasses = true;
            rootClassSource = null;

            throw e;
        }

        haveScannedReferencedClasses = true;

        ClassSource_Aggregate useRootClassSource = rootClassSource;
        rootClassSource = null;

        if (useRootClassSource == null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "Attempt scan referenced classes before activation");
            }

        } else {
            if (externalClassSourceCount == 0) {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, "Strange call to scan reference classes with no external class sources");
                }
            }

            createScanner(useRootClassSource).scanReferenced();
            // 'createScanner' and 'scan' both throw AnnotationTargets_Exception
        }
    }
1337580
@Override
    public void afterPropertiesSet() throws Exception {
        if (this.jaxbLoader == null && this.mappedXmlResource == null) {
            throw new BeanCreationException("Either the 'jaxbLoader' property or the 'mappedXmlResource' property needs to be set");
        }

        if (this.jaxbLoader == null) {
            this.jaxbLoader = new CachingJaxbLoaderImpl<>(PersonData.class);
            ((CachingJaxbLoaderImpl<PersonData>) this.jaxbLoader).setMappedXmlResource(this.mappedXmlResource);
        }
    }
718587
protected void initialiseApplicationContext() {
        if (context != null) {
            return;
        }

        context = createApplicationContext(parent);

        if (parent != null && classLoader == null) {
            trySettingClassLoaderOnContextIfFoundInParent(parent);
        }
        else if (classLoader != null) {
            setClassLoaderOnContext(classLoader);
        }

        Assert.notNull(context, "ApplicationContext cannot be null");
    }
291141
@SuppressWarnings("unchecked")
    private void bindRootTypes() {
        for (Class type : tree.getRootTypes()) {
            // bind root configuration classes both with and without qualifier
            if (!type.isInterface() || bindInterfaces) {
                // bind interface as type only when it's allowed
                bind(type).toInstance(configuration);
            }
            bind(type).annotatedWith(Config.class).toInstance(configuration);
        }
    }
1077679
@PostConstruct
  @Override
  public void init()
    throws ConfigException
  {
    try {
      _codeSource = new CodeSource(new URL(_path.getURL()),
                                   (Certificate []) null);
    } catch (Exception e) {
      log.log(Level.FINE, e.toString(), e);
    }
    
    super.init();

    getClassLoader().addURL(_path, _isScanned);
  }
83354
@Override
	public void afterPropertiesSet() {

		super.afterPropertiesSet();
		compiler = new DefaultLessCompiler();
		lessConfig = new Configuration();
		lessConfig.getSourceMapConfiguration().setLinkSourceMap(false);
	}
1211945
@Override
	public void afterPropertiesSet() throws Exception {
		super.afterPropertiesSet();
		Assert.notNull(sql, "The SQL query must be provided");
		Assert.notNull(rowMapper, "RowMapper must be provided");
	}
1095899
@Override
    public void visitClassContext(ClassContext context) {
        try {
            JavaClass cls = context.getJavaClass();
            if (!cls.isEnum() && (cls.getMajor() >= Const.MAJOR_1_5)) {
                Method[] methods = cls.getMethods();
                for (Method m : methods) {
                    if (Values.CONSTRUCTOR.equals(m.getName()) && !m.isPrivate()) {
                        return;
                    }
                }
                firstEnumPC = 0;
                enumCount = 0;
                enumConstNames = new HashSet<String>(10);
                super.visitClassContext(context);
            }
        } finally {
            enumConstNames = null;
        }
    }
306791
public void afterPropertiesSet() throws Exception {
        Resource portletXml = resourceLoader.getResource("/WEB-INF/portlet.xml");
        Document doc = getDocument(portletXml.getInputStream());
        
        final XPathExpression roleNamesExpression;
        if (portletConfig == null) {
        	final XPathFactory xPathFactory = XPathFactory.newInstance();
        	
        	final XPath xPath = xPathFactory.newXPath();
        	roleNamesExpression = xPath.compile("/portlet-app/portlet/security-role-ref/role-name");
        }
        else {
        	final XPathFactory xPathFactory = XPathFactory.newInstance();
            xPathFactory.setXPathVariableResolver(new XPathVariableResolver() {
                @Override
                public Object resolveVariable(QName variableName) {
                    if ("portletName".equals(variableName.getLocalPart())) {
                        return portletConfig.getPortletName();
                    }

                    return null;
                }
            });
            final XPath xPath = xPathFactory.newXPath();
        	roleNamesExpression = xPath.compile("/portlet-app/portlet[portlet-name=$portletName]/security-role-ref/role-name");
        }
        
        final NodeList securityRoles = (NodeList)roleNamesExpression.evaluate(doc, XPathConstants.NODESET);
        final Set<String> roleNames = new HashSet<String>();

        for (int i=0; i < securityRoles.getLength(); i++) {
            Element secRoleElt = (Element) securityRoles.item(i);
            String roleName = secRoleElt.getTextContent().trim();
            roleNames.add(roleName);
            logger.info("Retrieved role-name '" + roleName + "' from portlet.xml");
        }
        
        if (roleNames.isEmpty()) {
        	logger.info("No security-role-ref elements found in " + portletXml + (portletConfig == null ? "" : " for portlet " + portletConfig.getPortletName()));
        }

        mappableAttributes = Collections.unmodifiableSet(roleNames);
    }
449695
private static LookupResult tryAsScript(String name, CompilationUnit compilationUnit, ClassNode oldClass) {
        LookupResult lr = null;
        if (oldClass!=null) {
            lr = new LookupResult(null, oldClass);
        }
        
        if (name.startsWith("java.")) return lr;
        //TODO: don't ignore inner static classes completely
        if (name.indexOf('$') != -1) return lr;
        
        // try to find a script from classpath*/
        GroovyClassLoader gcl = compilationUnit.getClassLoader();
        URL url = null;
        try {
            url = gcl.getResourceLoader().loadGroovySource(name);
        } catch (MalformedURLException e) {
            // fall through and let the URL be null
        }
        if (url != null && ( oldClass==null || isSourceNewer(url, oldClass))) {
            SourceUnit su = compilationUnit.addSource(url);
            return new LookupResult(su,null);
        }
        return lr;
    }
634096
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            nodeCreations = new HashMap<>();
            nodeStores = new HashMap<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            nodeCreations = null;
            nodeStores = null;
        }
    }
123106
@SuppressWarnings("nls")
	private void checkNotNull(Object sourceClass, Object eventSetName, Object alistenerType, Object listenerMethodName)
	{
		if (sourceClass == null)
		{
			throw new NullPointerException(Messages.getString("beans.0C"));
		}
		if (eventSetName == null)
		{
			throw new NullPointerException(Messages.getString("beans.53"));
		}
		if (alistenerType == null)
		{
			throw new NullPointerException(Messages.getString("beans.54"));
		}
		if (listenerMethodName == null)
		{
			throw new NullPointerException(Messages.getString("beans.52"));
		}
	}
1031708
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            clsContext = classContext;
            JavaClass cls = classContext.getJavaClass();
            if (cls.isInterface())
                return;
            superClasses = cls.getSuperClasses();
            cls.accept(this);
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            clsContext = null;
            superClasses = null;
        }
    }
378788
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            if (isSingleton(cls)) {
                syncBlockBranchResetValues = new HashMap<>();
                stack = new OpcodeStack();
                super.visitClassContext(classContext);
            }
        } finally {
            syncBlockBranchResetValues = null;
            stack = null;
        }
    }
598277
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass cls = classContext.getJavaClass();
        clsVersion = cls.getMajor();
        super.visitClassContext(classContext);
    }
459784
@Override
    public void visitClassContext(final ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            packageName = cls.getPackageName();
            clsName = cls.getClassName();
            parentClassName = cls.getSuperclassName();
            stack = new OpcodeStack();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            clsAccessCount = null;
            packageName = null;
            clsName = null;
            parentClassName = null;
        }
    }
955421
protected void postProcessApplicationContext(ConfigurableApplicationContext context) {
		if (this.beanNameGenerator != null) {
			context.getBeanFactory().registerSingleton(
					AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR,
					this.beanNameGenerator);
		}
		if (this.resourceLoader != null) {
			if (context instanceof GenericApplicationContext) {
				((GenericApplicationContext) context)
						.setResourceLoader(this.resourceLoader);
			}
			if (context instanceof DefaultResourceLoader) {
				((DefaultResourceLoader) context)
						.setClassLoader(this.resourceLoader.getClassLoader());
			}
		}
		if (this.addConversionService) {
			context.getBeanFactory().setConversionService(
					ApplicationConversionService.getSharedInstance());
		}
	}