javax.annotation.ManagedBean Java Examples

The following examples show how to use javax.annotation.ManagedBean. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MyFacesInitializerRegistrationBean.java    From joinfaces with Apache License 2.0 6 votes vote down vote up
@Override
protected void handleScanResult(ScanResult scanResult) {
	super.handleScanResult(scanResult);

	Map<Class<? extends Annotation>, Set<Class<?>>> annotatedClasses = new HashMap<>();

	Arrays.asList(
			ManagedBean.class,
			FacesComponent.class,
			FacesBehavior.class,
			FacesConverter.class,
			NamedEvent.class,
			FacesRenderer.class,
			FacesBehaviorRenderer.class,
			FacesValidator.class
	).forEach(annotationClass -> {
		List<Class<?>> classes = scanResult.getClassesWithAnnotation(annotationClass.getName()).loadClasses();
		annotatedClasses.put(annotationClass, new HashSet<>(classes));
	});

	JoinFacesAnnotationProvider.setAnnotatedClasses(annotatedClasses);
}
 
Example #2
Source File: AutoConfig.java    From tomee with Apache License 2.0 5 votes vote down vote up
private boolean isIgnoredReferenceType(final String typeName, final ClassLoader loader) {
    if (ignoredReferenceTypes.contains(typeName)) {
        return true;
    } else if (loader != null) {
        try {
            final Class<?> type = loader.loadClass(typeName);
            return type.isAnnotationPresent(ManagedBean.class);
        } catch (final ClassNotFoundException e) {
            // ignore
        }
    }
    return false;
}
 
Example #3
Source File: CandidateComponentsIndexerTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void cdiManagedBean() {
	testSingleComponent(SampleManagedBean.class, ManagedBean.class);
}
 
Example #4
Source File: CandidateComponentsIndexerTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void cdiManagedBean() {
	testSingleComponent(SampleManagedBean.class, ManagedBean.class);
}