rt/vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java
branchclosure
changeset 1513 ba912ef24b27
parent 1495 d5dd07b45f79
parent 1413 b597de629d33
child 1583 89b6b369c13d
     1.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java	Mon Apr 28 10:59:12 2014 +0200
     1.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java	Wed Apr 30 15:04:10 2014 +0200
     1.3 @@ -217,7 +217,21 @@
     1.4       * @since 0.5
     1.5       */
     1.6      public Bck2Brwsr resources(final ClassLoader loader) {
     1.7 -        return resources(new LdrRsrcs(loader));
     1.8 +        return resources(loader, false);
     1.9 +    }
    1.10 +
    1.11 +    /** A way to change the provider of additional resources (classes) for the 
    1.12 +     * compiler by specifying classloader to use for loading them.
    1.13 +     * 
    1.14 +     * @param loader class loader to load the resources from
    1.15 +     * @param ignoreBootClassPath <code>true</code> if classes loaded
    1.16 +     *    from <code>rt.jar</code> 
    1.17 +     * @return new instance of the compiler with all values being the same, just 
    1.18 +     *   different resources provider
    1.19 +     * @since 0.9
    1.20 +     */
    1.21 +    public Bck2Brwsr resources(final ClassLoader loader, boolean ignoreBootClassPath) {
    1.22 +        return resources(new LdrRsrcs(loader, ignoreBootClassPath));
    1.23      }
    1.24      
    1.25      /** Generates virtual machine based on previous configuration of the 
    1.26 @@ -247,7 +261,7 @@
    1.27      // 
    1.28      
    1.29      Resources getResources() {
    1.30 -        return res != null ? res : new LdrRsrcs(Bck2Brwsr.class.getClassLoader());
    1.31 +        return res != null ? res : new LdrRsrcs(Bck2Brwsr.class.getClassLoader(), false);
    1.32      }
    1.33      
    1.34      String[] allClasses() {