當前位置: 首頁>>代碼示例>>Java>>正文


Java RenderingManager類代碼示例

本文整理匯總了Java中org.teavm.backend.javascript.rendering.RenderingManager的典型用法代碼示例。如果您正苦於以下問題:Java RenderingManager類的具體用法?Java RenderingManager怎麽用?Java RenderingManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RenderingManager類屬於org.teavm.backend.javascript.rendering包,在下文中一共展示了RenderingManager類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
@Override
public void begin(RenderingManager context, BuildTarget buildTarget) throws IOException {
    SourceWriter writer = context.getWriter();
    String url = System.getProperty("rest.service.url");
    writer.append("var $test_url = \"")
            .append(RenderingUtil.escapeString(url != null ? url : ""))
            .append("\";")
            .newLine();
}
 
開發者ID:konsoletyper,項目名稱:teavm-flavour,代碼行數:10,代碼來源:RESTUrlGenerator.java

示例2: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
@Override
public void begin(RenderingManager manager, BuildTarget buildTarget) throws IOException {
    StringWriter writer = new StringWriter();
    resourceToWriter("org/teavm/backend/javascript/runtime.js", writer);
    writer.close();
    manager.getWriter().append(writer.toString()).newLine();
}
 
開發者ID:konsoletyper,項目名稱:teavm,代碼行數:8,代碼來源:TeaVMTool.java

示例3: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
@Override
public void begin(RenderingManager manager, BuildTarget buildTarget) throws IOException {
    boolean hasOneResource = false;
    for (String className : manager.getClassSource().getClassNames()) {
        ClassReader cls = manager.getClassSource().get(className);
        AnnotationReader annot = cls.getAnnotations().get(JavaScriptResource.class.getName());
        if (annot == null) {
            continue;
        }
        String path = annot.getValue("value").getString();
        String packageName = className.substring(0, className.lastIndexOf('.'));
        String resourceName = packageName.replace('.', '/') + "/" + path;
        try (InputStream input = manager.getClassLoader().getResourceAsStream(resourceName)) {
            if (input == null) {
                throw new RenderingException("Error processing JavaScriptResource annotation on class "
                        + className + ". Resource not found: " + resourceName);
            }
            StringWriter writer = new StringWriter();
            IOUtils.copy(input, writer);
            writer.close();
            manager.getWriter().append("// Resource " + path + " included by " + className).newLine();
            manager.getWriter().append(writer.toString()).newLine().newLine();
        }
        hasOneResource = true;
    }
    if (hasOneResource) {
        manager.getWriter().append("// TeaVM generated classes").newLine();
    }
}
 
開發者ID:konsoletyper,項目名稱:teavm,代碼行數:30,代碼來源:JavaScriptResourceInterceptor.java

示例4: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
@Override
public void begin(RenderingManager context, BuildTarget buildTarget) throws IOException {
    this.context = context;
}
 
開發者ID:konsoletyper,項目名稱:teavm-libgdx,代碼行數:5,代碼來源:AssetsCopier.java

示例5: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
@Override
public void begin(RenderingManager context, BuildTarget buildTarget) throws IOException {
    writer = context.getWriter();
    classSource = context.getClassSource();
}
 
開發者ID:konsoletyper,項目名稱:teavm,代碼行數:6,代碼來源:JSAliasRenderer.java

示例6: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
@Override
public void begin(RenderingManager context, BuildTarget buildTarget) throws IOException {
    classSource = context.getClassSource();
    writer = context.getWriter();
}
 
開發者ID:konsoletyper,項目名稱:teavm,代碼行數:6,代碼來源:JavaScriptObjectEnhancer.java

示例7: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
@Override
public void begin(RenderingManager manager, BuildTarget buildTarget) throws IOException {
}
 
開發者ID:konsoletyper,項目名稱:teavm,代碼行數:4,代碼來源:AbstractRendererListener.java

示例8: begin

import org.teavm.backend.javascript.rendering.RenderingManager; //導入依賴的package包/類
void begin(RenderingManager context, BuildTarget buildTarget) throws IOException; 
開發者ID:konsoletyper,項目名稱:teavm,代碼行數:2,代碼來源:RendererListener.java


注:本文中的org.teavm.backend.javascript.rendering.RenderingManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。