rt/vm/src/test/java/org/apidesign/vm4brwsr/DelayedLoading.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Fri, 11 Oct 2013 09:58:03 +0200
changeset 1367 6193e735f4d1
child 1787 ea12a3bb4b33
permissions -rw-r--r--
If a class is not available during Ahead-Of-Time compilation it needs to be ready for dynamic loading
jaroslav@1367
     1
/**
jaroslav@1367
     2
 * Back 2 Browser Bytecode Translator
jaroslav@1367
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@1367
     4
 *
jaroslav@1367
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@1367
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@1367
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@1367
     8
 *
jaroslav@1367
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@1367
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@1367
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@1367
    12
 * GNU General Public License for more details.
jaroslav@1367
    13
 *
jaroslav@1367
    14
 * You should have received a copy of the GNU General Public License
jaroslav@1367
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@1367
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@1367
    17
 */
jaroslav@1367
    18
package org.apidesign.vm4brwsr;
jaroslav@1367
    19
jaroslav@1367
    20
import java.net.URL;
jaroslav@1367
    21
jaroslav@1367
    22
/**
jaroslav@1367
    23
 *
jaroslav@1367
    24
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jaroslav@1367
    25
 */
jaroslav@1367
    26
public class DelayedLoading {
jaroslav@1367
    27
    public static String toStrViaURI(String url) throws Exception {
jaroslav@1367
    28
        URL u = new URL(url);
jaroslav@1367
    29
        return u.toURI().toString();
jaroslav@1367
    30
    }
jaroslav@1367
    31
}