@@ -0,0 +1,2641 @@
+/*%0A * Copyright 2017, TeamDev Ltd. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.tools.protoc;%0A%0Aimport com.google.protobuf.Message;%0Aimport com.squareup.javapoet.AnnotationSpec;%0Aimport com.squareup.javapoet.CodeBlock;%0Aimport com.squareup.javapoet.JavaFile;%0Aimport com.squareup.javapoet.TypeSpec;%0A%0Aimport javax.annotation.Generated;%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport static javax.lang.model.element.Modifier.PUBLIC;%0A%0A/**%0A * @author Dmytro Dashenkov%0A */%0Apublic final class MarkerInterfaceGenerator %7B%0A%0A    private static final AnnotationSpec GENERATED;%0A    private static final String GENERATED_FIELD_NAME = %22value%22;%0A%0A    static %7B%0A        final CodeBlock generatedByDescription = CodeBlock.of(%22%5C%22by Spine protoc plugin%5C%22%22);%0A        GENERATED = AnnotationSpec.builder(Generated.class)%0A                                  .addMember(GENERATED_FIELD_NAME, generatedByDescription)%0A                                  .build();%0A    %7D%0A%0A    private final File outputFile;%0A%0A    public MarkerInterfaceGenerator(File outputFile) %7B%0A        this.outputFile = outputFile;%0A    %7D%0A%0A    public void generate(String packageName, String typeName) %7B%0A        final TypeSpec spec = TypeSpec.interfaceBuilder(typeName)%0A                                      .addSuperinterface(Message.class)%0A                                      .addModifiers(PUBLIC)%0A                                      .addAnnotation(GENERATED)%0A                                      .build();%0A        try %7B%0A            JavaFile.builder(packageName, spec)%0A                    .build()%0A                    .writeTo(outputFile);%0A        %7D catch (IOException e) %7B%0A            throw new IllegalStateException(e);%0A        %7D%0A    %7D%0A%7D%0A

Add MarkerInterfaceGenerator.