All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jqassistant.plugin.c4.report.C4Language Maven / Gradle / Ivy

The newest version!
package org.jqassistant.plugin.c4.report;

import com.buschmais.jqassistant.core.report.api.SourceProvider;
import com.buschmais.jqassistant.core.report.api.model.Language;
import com.buschmais.jqassistant.core.report.api.model.LanguageElement;
import org.jqassistant.plugin.c4.model.*;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Defines the language elements for "C4"
 */
@Language
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface C4Language {

    C4LanguageElement value();

    enum C4LanguageElement implements LanguageElement {

        Boundary {
            @Override
            public SourceProvider getSourceProvider() {
                return ElementDescriptor::getName;
            }
        },

        Component {
            @Override
            public SourceProvider getSourceProvider() {
                return ElementDescriptor::getName;
            }
        },

        Container {
            @Override
            public SourceProvider getSourceProvider() {
                return ElementDescriptor::getName;
            }
        },

        Person {
            @Override
            public SourceProvider getSourceProvider() {
                return ElementDescriptor::getName;
            }
        },

        System {
            @Override
            public SourceProvider getSourceProvider() {
                return ElementDescriptor::getName;
            }
        };

        @Override
        public String getLanguage() {
            return "C4";
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy