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

org.mapstruct.ap.internal.model.Javadoc Maven / Gradle / Ivy

There is a newer version: 1.6.3
Show newest version
/*
 * Copyright MapStruct Authors.
 *
 * Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
 */
package org.mapstruct.ap.internal.model;

import org.mapstruct.ap.internal.model.common.ModelElement;
import org.mapstruct.ap.internal.model.common.Type;

import java.util.Collections;
import java.util.List;
import java.util.Set;

/**
 * Represents the javadoc information that should be generated for a {@link Mapper}.
 *
 * @author Jose Carlos Campanero Ortiz
 */
public class Javadoc extends ModelElement {

    public static class Builder {

        private String value;
        private List authors;
        private String deprecated;
        private String since;

        public Builder value(String value) {
            this.value = value;
            return this;
        }

        public Builder authors(List authors) {
            this.authors = authors;
            return this;
        }

        public Builder deprecated(String deprecated) {
            this.deprecated = deprecated;
            return this;
        }

        public Builder since(String since) {
            this.since = since;
            return this;
        }

        public Javadoc build() {
            return new Javadoc(
                    value,
                    authors,
                    deprecated,
                    since
            );
        }
    }

    private final String value;
    private final List authors;
    private final String deprecated;
    private final String since;

    private Javadoc(String value, List authors, String deprecated, String since) {
        this.value = value;
        this.authors = authors != null ? Collections.unmodifiableList( authors ) : Collections.emptyList();
        this.deprecated = deprecated;
        this.since = since;
    }

    public String getValue() {
        return value;
    }

    public List getAuthors() {
        return authors;
    }

    public String getDeprecated() {
        return deprecated;
    }

    public String getSince() {
        return since;
    }

    @Override
    public Set getImportTypes() {
        return Collections.emptySet();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy