Package com.asakusafw.dmdl.source

Examples of com.asakusafw.dmdl.source.DmdlSourceFile$FileListCursor


     * @param lines DMDL lines
     * @return analyzed model
     */
    public DmdlSemantics analyze(String... lines) {
        try {
            return analyze(new DmdlSourceFile(
                    Arrays.asList(emitDmdl(lines)),
                    Charset.forName("UTF-8")));
        } catch (Exception e) {
            throw new AssertionError(e);
        }
View Full Code Here


     * @param lines DMDL lines
     * @return generated classes
     */
    protected ModelLoader generateJava(String... lines) {
        try {
            List<VolatileJavaFile> sources = emit(new DmdlSourceFile(
                    Arrays.asList(emitDmdl(lines)),
                    Charset.forName("UTF-8")));
            ClassLoader loaded = compile(sources);
            return new ModelLoader(loaded);
        } catch (Exception e) {
View Full Code Here

     * Requires to raise error from specified DMDL.
     * @param lines DMDL lines
     */
    protected void shouldSemanticError(String... lines) {
        try {
            emit(new DmdlSourceFile(
                    Arrays.asList(emitDmdl(lines)),
                    Charset.forName("UTF-8")));
            throw new AssertionError("semantic error should be raised");
        } catch (IOException e) {
            // ok.
View Full Code Here

            throw new IllegalArgumentException("cs must not be null"); //$NON-NLS-1$
        }
        List<DmdlSourceRepository> repositories = Lists.create();
        for (File file : files) {
            if (file.isFile()) {
                repositories.add(new DmdlSourceFile(Collections.singletonList(file), cs));
            } else if (file.isDirectory()) {
                repositories.add(new DmdlSourceDirectory(
                        file,
                        cs,
                        Pattern.compile(".*\\.dmdl"), //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.source.DmdlSourceFile$FileListCursor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.