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

com.mysema.query.apt.Configuration Maven / Gradle / Ivy

There is a newer version: 3.7.4
Show newest version
/*
 * Copyright 2015, The Querydsl Team (http://www.querydsl.com/team)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mysema.query.apt;

import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.List;
import java.util.Set;

import javax.annotation.Nullable;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;

import com.google.common.base.Function;
import com.mysema.query.codegen.*;
import com.mysema.util.Annotations;

/**
 * Configuration defines the configuration options for APT based Querydsl code generation
 *
 * @author tiwe
 *
 */
public interface Configuration {

    /**
     * @return
     */
    boolean isUnknownAsEmbedded();

    /**
     * @return
     */
    TypeMappings getTypeMappings();

    /**
     * @param e
     * @param elements
     * @return
     */
    VisitorConfig getConfig(TypeElement e, List elements);

    /**
     * @return
     */
    Serializer getDTOSerializer();

    /**
     * @return
     */
    @Nullable
    Class getEntitiesAnnotation();

    /**
     * @return
     */
    @Nullable
    Class getEmbeddedAnnotation();

    /**
     * @return
     */
    @Nullable
    Class getEmbeddableAnnotation();

    /**
     * @return
     */
    Serializer getEmbeddableSerializer();

    /**
     * @return
     */
    Class getEntityAnnotation();

    /**
     * @return
     */
    Class getAlternativeEntityAnnotation();

    /**
     * @return
     */
    Set> getEntityAnnotations();

    /**
     * @return
     */
    Serializer getEntitySerializer();

    /**
     * @return
     */
    String getNamePrefix();

    /**
     * @return
     */
    String getNameSuffix();

    /**
     * @param entityType
     * @return
     */
    SerializerConfig getSerializerConfig(EntityType entityType);

    /**
     * @return
     */
    @Nullable
    Class getSkipAnnotation();

    /**
     * @return
     */
    @Nullable
    Class getSuperTypeAnnotation();

    /**
     * @return
     */
    Serializer getSupertypeSerializer();

    /**
     * @param field
     * @return
     */
    boolean isBlockedField(VariableElement field);

    /**
     * @param getter
     * @return
     */
    boolean isBlockedGetter(ExecutableElement getter);

    /**
     * @return
     */
    boolean isUseFields();

    /**
     * @return
     */
    boolean isUseGetters();

    /**
     * @param constructor
     * @return
     */
    boolean isValidConstructor(ExecutableElement constructor);

    /**
     * @param field
     * @return
     */
    boolean isValidField(VariableElement field);

    /**
     * @param getter
     * @return
     */
    boolean isValidGetter(ExecutableElement getter);

    /**
     * @return
     */
    Collection getKeywords();

    /**
     * @return
     */
    QueryTypeFactory getQueryTypeFactory();

    /**
     * @param packageName
     */
    void addExcludedPackage(String packageName);

    /**
     * @param className
     */
    void addExcludedClass(String className);

    /**
     * @param method
     * @return
     */
    TypeMirror getRealType(ExecutableElement method);

    /**
     * @param field
     * @return
     */
    TypeMirror getRealType(VariableElement field);

    /**
     * @param packageName
     * @return
     */
    boolean isExcludedPackage(String packageName);

    /**
     * @param className
     * @return
     */
    boolean isExcludedClass(String className);

    /**
     * @param element
     * @param annotations
     */
    void inspect(Element element, Annotations annotations);

    /**
     *
     * @return
     */
    boolean isStrictMode();

    Function getVariableNameFunction();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy