当前位置: 首页>>代码示例>>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;未经允许,请勿转载。