fx-cdi/src/main/java/com/cathive/fx/cdi/CdiFXMLLoaderFactory.java
@Produces
    @FXMLLoaderParams
    FXMLLoader createCdiFXMLLoader(final InjectionPoint injectionPoint) {
        final CdiFXMLLoader fxmlLoader = new CdiFXMLLoader();
        final Annotated annotated = injectionPoint.getAnnotated();
        final Class<?> declaringClass = injectionPoint.getMember().getDeclaringClass();
        if (annotated.isAnnotationPresent(FXMLLoaderParams.class)) {
            final FXMLLoaderParams annotation = annotated.getAnnotation(FXMLLoaderParams.class);
            initializeFXMLLoader(fxmlLoader, declaringClass, annotation.location(), annotation.resources(), annotation.charset());
        }
        return fxmlLoader;
    }
@Produces
    @FXMLLoaderParams
    FXMLLoader createCdiFXMLLoader(final InjectionPoint injectionPoint) {
        final CdiFXMLLoader fxmlLoader = new CdiFXMLLoader();
        final Annotated annotated = injectionPoint.getAnnotated();
        final Class<?> declaringClass = injectionPoint.getMember().getDeclaringClass();
        if (annotated.isAnnotationPresent(FXMLLoaderParams.class)) {
            final FXMLLoaderParams annotation = annotated.getAnnotation(FXMLLoaderParams.class);
            initializeFXMLLoader(fxmlLoader, declaringClass, annotation.location(), annotation.resources(), annotation.charset());
        }
        return fxmlLoader;
    }
@ Produces @ FXMLLoaderParams FXMLLoader createCdiFXMLLoader ( final InjectionPoint injectionPoint ) { final CdiFXMLLoader fxmlLoader = new CdiFXMLLoader ( ) ; final Annotated annotated = injectionPoint . getAnnotated ( ) ; final Class < ? > declaringClass = injectionPoint . getMember ( ) . getDeclaringClass ( ) ; if ( annotated . isAnnotationPresent ( FXMLLoaderParams . class ) ) { final FXMLLoaderParams annotation = annotated . getAnnotation ( FXMLLoaderParams . class ) ; initializeFXMLLoader ( fxmlLoader , declaringClass , annotation . location ( ) , annotation . resources ( ) , annotation . charset ( ) ) ; } return fxmlLoader ; }
Create a CDI-aware FXMLLoader.
If an annotation of type @FXMLLoaderParams can be found, use it's parameters
to configure the FXMLLoader instance that shall be used to perform the loading
of the FXML file.

@param injectionPoint
Injection point.
@return
A new FXMLLoader instance.
Create a CDI - aware FXMLLoader . If an annotation of type @FXMLLoaderParams can be found use it s parameters to configure the FXMLLoader instance that shall be used to perform the loading of the FXML file .