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

poussecafe.doc.AggregateDocCreator Maven / Gradle / Ivy

There is a newer version: 0.29.0
Show newest version
package poussecafe.doc;

import javax.lang.model.element.TypeElement;
import jdk.javadoc.doclet.DocletEnvironment;
import poussecafe.doc.commands.CreateAggregateDoc;
import poussecafe.doc.model.aggregatedoc.AggregateDocFactory;
import poussecafe.doc.model.boundedcontextdoc.BoundedContextDocId;
import poussecafe.runtime.Runtime;

public class AggregateDocCreator extends BoundedContextComponentDocCreator {

    public AggregateDocCreator(DocletEnvironment environment) {
        super(environment);
    }

    @Override
    protected boolean isComponentDoc(TypeElement classDoc) {
        return aggregateDocFactory.isAggregateDoc(classDoc);
    }

    private AggregateDocFactory aggregateDocFactory;

    @Override
    protected String componentName() {
        return "aggregate";
    }

    @Override
    protected void addDoc(BoundedContextDocId boundedContextDocId,
            TypeElement componentClassDoc) {
        CreateAggregateDoc command = runtime.newCommand(CreateAggregateDoc.class);
        command.boundedContextId().value(boundedContextDocId);
        command.className().value(componentClassDoc.getQualifiedName().toString());
        runtime.submitCommand(command);
    }

    private Runtime runtime;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy