Search in sources :

Example 1 with STJSBridge

use of org.stjs.javascript.annotation.STJSBridge in project st-js by st-js.

the class BridgeClass method getJavascriptFiles.

/**
 * {@inheritDoc}
 */
@Override
public List<URI> getJavascriptFiles() {
    STJSBridge bridgeAnnotation = ClassUtils.getAnnotation(clazz, STJSBridge.class);
    if (!hasSourceAnnotation(bridgeAnnotation)) {
        return Collections.emptyList();
    }
    List<URI> files = new ArrayList<URI>();
    for (String src : bridgeAnnotation.sources()) {
        try {
            if (src.length() > 0) {
                files.add(new URI(src));
            }
        } catch (URISyntaxException e) {
            throw new JavascriptClassGenerationException(getJavaClassName(), e);
        }
    }
    return files;
}
Also used : STJSBridge(org.stjs.javascript.annotation.STJSBridge) ArrayList(java.util.ArrayList) URISyntaxException(java.net.URISyntaxException) URI(java.net.URI)

Aggregations

URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 ArrayList (java.util.ArrayList)1 STJSBridge (org.stjs.javascript.annotation.STJSBridge)1