fx-cdi/src/main/java/com/cathive/fx/cdi/CdiFXMLLoaderFactory.java
private static void checkAndSetLocation(FXMLLoader fxmlLoader, Class<?> targetClass, String location) {
        if (location != null && !location.equals(LOCATION_UNSPECIFIED)) {
            final URL locationUrl = targetClass.getResource(location);
            if (locationUrl == null) {
                throw new IllegalArgumentException(String.format("Couldn't find FXML file: \"%s\".", location));
            }
            fxmlLoader.setLocation(locationUrl);
        }
    }
private static void checkAndSetLocation(FXMLLoader fxmlLoader, Class<?> targetClass, String location) {
        if (location != null && !location.equals(LOCATION_UNSPECIFIED)) {
            final URL locationUrl = targetClass.getResource(location);
            if (locationUrl == null) {
                throw new IllegalArgumentException(String.format("Couldn't find FXML file: \"%s\".", location));
            }
            fxmlLoader.setLocation(locationUrl);
        }
    }
private static void checkAndSetLocation ( FXMLLoader fxmlLoader , Class < ? > targetClass , String location ) { if ( location != null && ! location . equals ( LOCATION_UNSPECIFIED ) ) { final URL locationUrl = targetClass . getResource ( location ) ; if ( locationUrl == null ) { throw new IllegalArgumentException ( String . format ( "Couldn't find FXML file: \"%s\"." , location ) ) ; } fxmlLoader . setLocation ( locationUrl ) ; } }
Checks the location that has been specified (if any) and uses the default
class loader to create an URL that points to a FXML file on the classpath.

@param fxmlLoader  never <code>null</code>
@param targetClass never <code>null</code>
@param location    never <code>null</code> and should point to an existing FXML file, an Exception is thrown otherwise
Checks the location that has been specified ( if any ) and uses the default class loader to create an URL that points to a FXML file on the classpath .