rt/vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 23 Feb 2015 08:38:32 +0100
changeset 1783 46bf2ce6be79
parent 1609 752f48257d4a
child 1787 ea12a3bb4b33
permissions -rw-r--r--
Showing how to invoke the Bck2Brwsr.newCompiler and fixing Javadoc lints
jaroslav@298
     1
/**
jaroslav@298
     2
 * Back 2 Browser Bytecode Translator
jaroslav@298
     3
 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@298
     4
 *
jaroslav@298
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@298
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@298
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@298
     8
 *
jaroslav@298
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@298
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@298
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@298
    12
 * GNU General Public License for more details.
jaroslav@298
    13
 *
jaroslav@298
    14
 * You should have received a copy of the GNU General Public License
jaroslav@298
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@298
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@298
    17
 */
jaroslav@298
    18
package org.apidesign.vm4brwsr;
jaroslav@298
    19
jaroslav@298
    20
import java.io.IOException;
jaroslav@298
    21
import java.io.InputStream;
jaroslav@298
    22
jaroslav@298
    23
/** Build your own virtual machine! Use methods in this class to generate
jaroslav@298
    24
 * a skeleton JVM in JavaScript that contains pre-compiled classes of your
jaroslav@1783
    25
 * choice:
jaroslav@1783
    26
 * <pre>
jaroslav@1783
    27
 * Writer w = new {@link java.io.StringWriter}();
jaroslav@1783
    28
 * {@link #newCompiler() Bck2Brwsr.newCompiler}()
jaroslav@1783
    29
 *   .{@link #resources(org.apidesign.vm4brwsr.Bck2Brwsr.Resources)}
jaroslav@1783
    30
 *   .{@link #addRootClasses(java.lang.String...)}
jaroslav@1783
    31
 *   .{@link #addClasses(java.lang.String...)}
jaroslav@1783
    32
 *   .{@link #addExported(java.lang.String...)}
jaroslav@1783
    33
 *   .{@link #generate(java.lang.Appendable) generate(w)};
jaroslav@1783
    34
 * System.out.{@link java.io.PrintStream#print(java.lang.String) print(w.toString())};
jaroslav@1783
    35
 * </pre>
jaroslav@1783
    36
 * The generated script defines one JavaScript method that can
jaroslav@298
    37
 * be used to bootstrap and load the virtual machine: <pre>
jaroslav@298
    38
 * var vm = bck2brwsr();
jaroslav@298
    39
 * var main = vm.loadClass('org.your.pkg.Main');
jaroslav@1609
    40
 * main.invoke('main');
jaroslav@298
    41
 * </pre>
jaroslav@298
    42
 * In case one wants to initialize the virtual machine with ability to
jaroslav@298
    43
 * load classes lazily when needed, one can provide a loader function to
jaroslav@298
    44
 * when creating the virtual machine: <pre>
jaroslav@298
    45
 * var vm = bck2brwsr(function(resource) { 
jaroslav@298
    46
 *   return null; // byte[] for the resource
jaroslav@298
    47
 * });
jaroslav@298
    48
 * </pre>
jaroslav@424
    49
 * In this scenario, when a request for an unknown class is made, the loader
jaroslav@298
    50
 * function is asked for its byte code and the system dynamically transforms
jaroslav@298
    51
 * it to JavaScript.
jaroslav@729
    52
 * <p>
jaroslav@1609
    53
 * Instead of a loader function, one can also provide a URL to a JAR file
jaroslav@1609
    54
 * or a library JavaScript file generated with {@link #library(java.lang.String...)}
jaroslav@1609
    55
 * option on.
jaroslav@729
    56
 * The <code>bck2brwsr</code> system will do its best to download the file
jaroslav@1609
    57
 * and provide loader function for it automatically. In order to use
jaroslav@1609
    58
 * the JAR file <code>emul.zip</code> module needs to be available in the system.
jaroslav@729
    59
 * <p>
jaroslav@1609
    60
 * One can provide as many loader functions and URL references as necessary.
jaroslav@729
    61
 * Then the initialization code would look like:<pre>
jaroslav@729
    62
 * var vm = bck2brwsr(url1, url2, fnctn1, url3, functn2);
jaroslav@729
    63
 * </pre>
jaroslav@729
    64
 * The provided URLs and loader functions will be consulted one by one.
jaroslav@1609
    65
 * <p>
jaroslav@1609
    66
 * The initialization of the <b>Bck2Brwsr</b> is done asynchronously since 
jaroslav@1609
    67
 * version 0.9. E.g. call to <pre>
jaroslav@1609
    68
 * var vm = bck2brwsr('myapp.js');
jaroslav@1609
    69
 * var main = vm.loadClass('org.your.pkg.Main');
jaroslav@1609
    70
 * main.invoke('main');
jaroslav@1609
    71
 * </pre>
jaroslav@1609
    72
 * returns immediately and the call to the static main method will happen
jaroslav@1609
    73
 * once the virtual machine is initialized and the class available.
jaroslav@298
    74
 *
jaroslav@1783
    75
 * @author Jaroslav Tulach
jaroslav@298
    76
 */
jaroslav@298
    77
public final class Bck2Brwsr {
jaroslav@874
    78
    private final ObfuscationLevel level;
jaroslav@1583
    79
    private final StringArray exported;
jaroslav@874
    80
    private final StringArray classes;
jaroslav@1493
    81
    private final StringArray resources;
jaroslav@874
    82
    private final Resources res;
jaroslav@1584
    83
    private final Boolean extension;
jaroslav@1604
    84
    private final StringArray classpath;
jaroslav@874
    85
jaroslav@1584
    86
    private Bck2Brwsr(
jaroslav@1604
    87
            ObfuscationLevel level, 
jaroslav@1604
    88
            StringArray exported, StringArray classes, StringArray resources, 
jaroslav@1604
    89
            Resources res, 
jaroslav@1604
    90
            Boolean extension, StringArray classpath
jaroslav@1584
    91
    ) {
jaroslav@874
    92
        this.level = level;
jaroslav@1583
    93
        this.exported = exported;
jaroslav@874
    94
        this.classes = classes;
jaroslav@1493
    95
        this.resources = resources;
jaroslav@1493
    96
        this.res = res;
lubomir@1029
    97
        this.extension = extension;
jaroslav@1604
    98
        this.classpath = classpath;
jaroslav@298
    99
    }
jaroslav@874
   100
    
jaroslav@874
   101
    /** Helper method to generate virtual machine from bytes served by a <code>resources</code>
jaroslav@298
   102
     * provider.
lubomir@849
   103
     *
jaroslav@298
   104
     * @param out the output to write the generated JavaScript to
jaroslav@298
   105
     * @param resources provider of class files to use
jaroslav@298
   106
     * @param classes additional classes to include in the generated script
jaroslav@298
   107
     * @throws IOException I/O exception can be thrown when something goes wrong
jaroslav@298
   108
     */
jaroslav@298
   109
    public static void generate(Appendable out, Resources resources, String... classes) throws IOException {
jaroslav@874
   110
        newCompiler().resources(resources).addRootClasses(classes).generate(out);
lubomir@849
   111
    }
lubomir@849
   112
jaroslav@874
   113
    /** Helper method to generate virtual machine from bytes served by a class loader.
lubomir@849
   114
     *
lubomir@849
   115
     * @param out the output to write the generated JavaScript to
lubomir@849
   116
     * @param loader class loader to load needed classes from
lubomir@849
   117
     * @param classes additional classes to include in the generated script
lubomir@849
   118
     * @throws IOException I/O exception can be thrown when something goes wrong
lubomir@849
   119
     */
lubomir@849
   120
    public static void generate(Appendable out, ClassLoader loader, String... classes) throws IOException {
jaroslav@874
   121
        newCompiler().resources(loader).addRootClasses(classes).generate(out);
jaroslav@874
   122
    }
jaroslav@874
   123
    
jaroslav@874
   124
    /** Creates new instance of Bck2Brwsr compiler which is ready to generate
jaroslav@874
   125
     * empty Bck2Brwsr virtual machine. The instance can be further
jaroslav@874
   126
     * configured by calling chain of methods. For example: 
jaroslav@874
   127
     * <pre>
jaroslav@1783
   128
     * {@link #newCompiler()}.{@link #resources(org.apidesign.vm4brwsr.Bck2Brwsr.Resources) resources(loader)}.{@link #addRootClasses(java.lang.String[]) addRootClasses("your/Clazz")}.{@link #generate(java.lang.Appendable) generate(out)};
jaroslav@874
   129
     * </pre>
jaroslav@874
   130
     * 
jaroslav@874
   131
     * @return new instance of the Bck2Brwsr compiler
jaroslav@874
   132
     * @since 0.5
jaroslav@874
   133
     */
jaroslav@874
   134
    public static Bck2Brwsr newCompiler() {
jaroslav@1604
   135
        return new Bck2Brwsr(
jaroslav@1604
   136
            ObfuscationLevel.NONE, 
jaroslav@1604
   137
            new StringArray(), new StringArray(), new StringArray(), 
jaroslav@1604
   138
            null, false, null
jaroslav@1604
   139
        );
lubomir@849
   140
    }
jaroslav@1583
   141
    
jaroslav@1583
   142
    /** Adds exported classes or packages. If the string ends 
jaroslav@1583
   143
     * with slash, it is considered a name of package. If it does not,
jaroslav@1583
   144
     * it is a name of a class (without <code>.class</code> suffix).
jaroslav@1583
   145
     * The exported classes are prevented from being obfuscated. 
jaroslav@1583
   146
     * All public classes in exported packages are prevented from
jaroslav@1583
   147
     * being obfuscated. By listing the packages or classes in this 
jaroslav@1583
   148
     * method, these classes are not guaranteed to be included in
jaroslav@1583
   149
     * the generated script. Use {@link #addClasses} to include
jaroslav@1583
   150
     * the classes.
jaroslav@1583
   151
     * 
jaroslav@1583
   152
     * @param exported names of classes and packages to treat as exported
jaroslav@1583
   153
     * @return new instances of the Bck2Brwsr compiler which inherits
jaroslav@1583
   154
     *   all values from <code>this</code> except list of exported classes
jaroslav@1583
   155
     */
jaroslav@1583
   156
    public Bck2Brwsr addExported(String... exported) {
jaroslav@1583
   157
        return new Bck2Brwsr(
jaroslav@1583
   158
            level, this.exported.addAndNew(exported), 
jaroslav@1604
   159
            classes, resources, res, extension, classpath
jaroslav@1583
   160
        );
jaroslav@1583
   161
    }
lubomir@849
   162
jaroslav@1491
   163
    /** Adds additional classes 
jaroslav@1491
   164
     * to the list of those that should be included in the generated
jaroslav@1491
   165
     * JavaScript file.
jaroslav@1491
   166
     * These classes are guaranteed to be available in the
jaroslav@1491
   167
     * generated virtual machine code accessible using their fully 
jaroslav@1491
   168
     * qualified name. This brings the same behavior as if the
jaroslav@1491
   169
     * classes were added by {@link #addClasses(java.lang.String...) } and
jaroslav@1583
   170
     * exported via {@link #addExported(java.lang.String...)}.
jaroslav@874
   171
     * 
jaroslav@874
   172
     * @param classes the classes to add to the compilation
jaroslav@1491
   173
     * @return new instance of the Bck2Brwsr compiler which inherits
jaroslav@1491
   174
     * all values from <code>this</code>
jaroslav@874
   175
     */
jaroslav@874
   176
    public Bck2Brwsr addRootClasses(String... classes) {
jaroslav@874
   177
        if (classes.length == 0) {
jaroslav@874
   178
            return this;
jaroslav@1583
   179
        } 
jaroslav@1583
   180
        return addExported(classes).addClasses(classes);
jaroslav@874
   181
    }
jaroslav@874
   182
    
jaroslav@1491
   183
    /** Adds additional classes 
jaroslav@1491
   184
     * to the list of those that should be included in the generated
jaroslav@1491
   185
     * JavaScript file. These classes are guaranteed to be present,
jaroslav@1491
   186
     * but they may not be accessible through their fully qualified
jaroslav@1491
   187
     * name.
jaroslav@1491
   188
     * 
jaroslav@1491
   189
     * @param classes the classes to add to the compilation
jaroslav@1491
   190
     * @return new instance of the Bck2Brwsr compiler which inherits
jaroslav@1491
   191
     * all values from <code>this</code>
jaroslav@1491
   192
     * @since 0.9
jaroslav@1491
   193
     */
jaroslav@1491
   194
    public Bck2Brwsr addClasses(String... classes) {
jaroslav@1491
   195
        if (classes.length == 0) {
jaroslav@1491
   196
            return this;
jaroslav@1491
   197
        } else {
jaroslav@1583
   198
            return new Bck2Brwsr(level, exported, 
jaroslav@1583
   199
                this.classes.addAndNew(classes), resources, res,
jaroslav@1604
   200
                extension, classpath);
jaroslav@1491
   201
        }
jaroslav@1491
   202
    }
jaroslav@1491
   203
    
jaroslav@1493
   204
    /** These resources should be made available in the compiled file in
jaroslav@1493
   205
     * binary form. These resources can then be loaded
jaroslav@1493
   206
     * by {@link ClassLoader#getResource(java.lang.String)} and similar 
jaroslav@1493
   207
     * methods.
jaroslav@1493
   208
     * 
jaroslav@1493
   209
     * @param resources names of the resources to be loaded by {@link Resources#get(java.lang.String)}
jaroslav@1493
   210
     * @return new instance of the Bck2Brwsr compiler which inherits
jaroslav@1493
   211
     *   all values from <code>this</code> just adds few more resource names
jaroslav@1493
   212
     *   for processing
jaroslav@1493
   213
     * @since 0.9
jaroslav@1493
   214
     */
jaroslav@1493
   215
    public Bck2Brwsr addResources(String... resources) {
jaroslav@1493
   216
        if (resources.length == 0) {
jaroslav@1493
   217
            return this;
jaroslav@1493
   218
        } else {
jaroslav@1583
   219
            return new Bck2Brwsr(level, exported, this.classes, 
jaroslav@1604
   220
                this.resources.addAndNew(resources), res, extension, classpath
jaroslav@1493
   221
            );
jaroslav@874
   222
        }
jaroslav@874
   223
    }
jaroslav@874
   224
    
jaroslav@874
   225
    /** Changes the obfuscation level for the compiler by creating new instance
jaroslav@874
   226
     * which inherits all values from <code>this</code> and adjust the level
jaroslav@874
   227
     * of obfuscation.
jaroslav@874
   228
     * 
jaroslav@874
   229
     * @param level the new level of obfuscation
jaroslav@874
   230
     * @return new instance of the compiler with changed level of obfuscation
jaroslav@874
   231
     * @since 0.5
jaroslav@874
   232
     */
jaroslav@874
   233
    public Bck2Brwsr obfuscation(ObfuscationLevel level) {
jaroslav@1604
   234
        return new Bck2Brwsr(level, exported, classes, resources, res, extension, classpath);
jaroslav@874
   235
    }
jaroslav@874
   236
    
jaroslav@874
   237
    /** A way to change the provider of additional resources (classes) for the 
jaroslav@874
   238
     * compiler. 
jaroslav@874
   239
     * 
jaroslav@874
   240
     * @param res the implementation of resources provider
jaroslav@874
   241
     * @return new instance of the compiler with all values remaining the same, just 
jaroslav@874
   242
     *   with different resources provider
jaroslav@874
   243
     * @since 0.5
jaroslav@874
   244
     */
jaroslav@874
   245
    public Bck2Brwsr resources(Resources res) {
jaroslav@1604
   246
        return new Bck2Brwsr(
jaroslav@1604
   247
            level, exported, classes, resources, 
jaroslav@1604
   248
            res, extension, classpath
jaroslav@1604
   249
        );
lubomir@1029
   250
    }
lubomir@1029
   251
jaroslav@1491
   252
    /** Should one generate a library? By default the system generates
jaroslav@1491
   253
     * all transitive classes needed by the the transitive closure of
jaroslav@1491
   254
     * {@link #addRootClasses(java.lang.String...)} and {@link #addClasses(java.lang.String...)}.
jaroslav@1491
   255
     * By turning on the library mode, only classes explicitly listed
jaroslav@1491
   256
     * will be included in the archive. The others will be referenced
jaroslav@1491
   257
     * as external ones.
jaroslav@1604
   258
     * <p>
jaroslav@1604
   259
     * A library archive may specify its <em>classpath</em> - e.g. link to
jaroslav@1604
   260
     * other libraries that should also be included in the application. 
jaroslav@1604
   261
     * One can specify the list of libraries as vararg to this method.
jaroslav@1604
   262
     * These are relative URL with respect to location of this library.
jaroslav@1604
   263
     * The runtime system then prefers seek for ".js" suffix of the library
jaroslav@1604
   264
     * and only then seeks for the classical ".jar" path.
jaroslav@1491
   265
     * 
jaroslav@1604
   266
     * @param classpath the array of JARs that are referenced by this library -
jaroslav@1604
   267
     *   by default gets turned into 
jaroslav@1491
   268
     * @return new instance of the compiler with library flag changed
jaroslav@1491
   269
     * @since 0.9
jaroslav@1491
   270
     */
jaroslav@1604
   271
    public Bck2Brwsr library(String... classpath) {
jaroslav@1604
   272
        return new Bck2Brwsr(
jaroslav@1604
   273
            level, exported, classes, 
jaroslav@1604
   274
            resources, res, true, 
jaroslav@1604
   275
            StringArray.asList(classpath)
jaroslav@1604
   276
        );
jaroslav@874
   277
    }
jaroslav@1584
   278
    
jaroslav@1783
   279
    /** Turns on the standalone mode. E.g. does the opposite of
jaroslav@1783
   280
     * calling {@link #library(java.lang.String...)},
jaroslav@1584
   281
     * but also allows to specify whether the <em>Bck2Brwsr VM</em> should
jaroslav@1584
   282
     * be included at all. If not, only the skeleton of the launcher is
jaroslav@1584
   283
     * generated without any additional VM classes referenced.
jaroslav@1584
   284
     * 
jaroslav@1584
   285
     * @param includeVM should the VM be compiled in, or left out
jaroslav@1584
   286
     * @return new instance of the compiler with standalone mode on
jaroslav@1584
   287
     * @since 0.9
jaroslav@1584
   288
     */
jaroslav@1584
   289
    public Bck2Brwsr standalone(boolean includeVM) {
jaroslav@1604
   290
        return new Bck2Brwsr(
jaroslav@1604
   291
            level, exported, classes, resources, 
jaroslav@1604
   292
            res, includeVM ? false : null, null
jaroslav@1604
   293
        );
jaroslav@1584
   294
    }
jaroslav@874
   295
jaroslav@874
   296
    /** A way to change the provider of additional resources (classes) for the 
jaroslav@874
   297
     * compiler by specifying classloader to use for loading them.
jaroslav@874
   298
     * 
jaroslav@874
   299
     * @param loader class loader to load the resources from
jaroslav@874
   300
     * @return new instance of the compiler with all values being the same, just 
jaroslav@874
   301
     *   different resources provider
jaroslav@874
   302
     * @since 0.5
jaroslav@874
   303
     */
jaroslav@874
   304
    public Bck2Brwsr resources(final ClassLoader loader) {
jaroslav@1365
   305
        return resources(loader, false);
jaroslav@1365
   306
    }
jaroslav@1365
   307
jaroslav@1365
   308
    /** A way to change the provider of additional resources (classes) for the 
jaroslav@1365
   309
     * compiler by specifying classloader to use for loading them.
jaroslav@1365
   310
     * 
jaroslav@1365
   311
     * @param loader class loader to load the resources from
jaroslav@1365
   312
     * @param ignoreBootClassPath <code>true</code> if classes loaded
jaroslav@1365
   313
     *    from <code>rt.jar</code> 
jaroslav@1365
   314
     * @return new instance of the compiler with all values being the same, just 
jaroslav@1365
   315
     *   different resources provider
jaroslav@1365
   316
     * @since 0.9
jaroslav@1365
   317
     */
jaroslav@1365
   318
    public Bck2Brwsr resources(final ClassLoader loader, boolean ignoreBootClassPath) {
jaroslav@1365
   319
        return resources(new LdrRsrcs(loader, ignoreBootClassPath));
jaroslav@874
   320
    }
jaroslav@874
   321
    
jaroslav@874
   322
    /** Generates virtual machine based on previous configuration of the 
jaroslav@874
   323
     * compiler.
lubomir@849
   324
     * 
lubomir@849
   325
     * @param out the output to write the generated JavaScript to
jaroslav@1783
   326
     * @throws IOException I/O exception can be thrown when something goes wrong
lubomir@860
   327
     * @since 0.5
lubomir@849
   328
     */
jaroslav@874
   329
    public void generate(Appendable out) throws IOException {
jaroslav@874
   330
        if (level != ObfuscationLevel.NONE) {
lubomir@849
   331
            try {
jaroslav@1493
   332
                ClosureWrapper.produceTo(out, level, this);
lubomir@849
   333
                return;
lubomir@849
   334
            } catch (IOException ex) {
lubomir@849
   335
                throw ex;
lubomir@849
   336
            } catch (Throwable ex) {
lubomir@849
   337
                out.append("/* Failed to obfuscate: " + ex.getMessage()
lubomir@849
   338
                               + " */\n");
lubomir@849
   339
            }
jaroslav@750
   340
        }
lubomir@849
   341
jaroslav@1493
   342
        VM.compile(out, this);
jaroslav@298
   343
    }
jaroslav@298
   344
    
jaroslav@1493
   345
    //
jaroslav@1493
   346
    // Internal getters
jaroslav@1493
   347
    // 
jaroslav@1493
   348
    
jaroslav@1493
   349
    Resources getResources() {
jaroslav@1513
   350
        return res != null ? res : new LdrRsrcs(Bck2Brwsr.class.getClassLoader(), false);
jaroslav@1493
   351
    }
jaroslav@1493
   352
    
jaroslav@1495
   353
    StringArray allResources() {
jaroslav@1495
   354
        return resources;
jaroslav@1495
   355
    }
jaroslav@1495
   356
jaroslav@1583
   357
    StringArray classes() {
jaroslav@1583
   358
        return classes;
jaroslav@1583
   359
    }
jaroslav@1583
   360
jaroslav@1583
   361
    StringArray exported() {
jaroslav@1583
   362
        return exported;
jaroslav@1493
   363
    }
jaroslav@1493
   364
    
jaroslav@1493
   365
    boolean isExtension() {
jaroslav@1584
   366
        return Boolean.TRUE.equals(extension);
jaroslav@1584
   367
    }
jaroslav@1584
   368
    
jaroslav@1584
   369
    boolean includeVM() {
jaroslav@1584
   370
        return extension != null;
jaroslav@874
   371
    }
jaroslav@1604
   372
    
jaroslav@1604
   373
    StringArray classpath() {
jaroslav@1604
   374
        return classpath;
jaroslav@1604
   375
    }
lubomir@1086
   376
jaroslav@298
   377
    /** Provider of resources (classes and other files). The 
jaroslav@298
   378
     * {@link #generate(java.lang.Appendable, org.apidesign.vm4brwsr.Bck2Brwsr.Resources, java.lang.String[]) 
jaroslav@298
   379
     * generator method} will call back here for all classes needed during
jaroslav@298
   380
     * translation to JavaScript.
jaroslav@298
   381
     */
jaroslav@298
   382
    public interface Resources {
jaroslav@298
   383
        /** Loads given resource (class or other file like image). The 
jaroslav@298
   384
         * resource name to load bytes for the {@link String} class
jaroslav@298
   385
         * would be <code>"java/lang/String.class"</code>.
jaroslav@298
   386
         * 
jaroslav@298
   387
         * @param resource path to resource to load
jaroslav@298
   388
         * @return the input stream for the resource 
jaroslav@298
   389
         * @throws IOException can be thrown if the loading fails on some error
jaroslav@298
   390
         *   or the file cannot be found
jaroslav@298
   391
         */
jaroslav@298
   392
        public InputStream get(String resource) throws IOException;
jaroslav@298
   393
    }
jaroslav@298
   394
}