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

framework.src.org.checkerframework.qualframework.poly.AnnotationConverterConfiguration Maven / Gradle / Ivy

Go to download

The Checker Framework enhances Java’s type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

There is a newer version: 3.42.0
Show newest version
package org.checkerframework.qualframework.poly;

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

/**
 * Plain old java object to help configure SimpleQualifierParameterAnnotationConverter.
 */
public class AnnotationConverterConfiguration {

    private final CombiningOperation lowerOp;
    private final CombiningOperation upperOp;
    private final String multiAnnoNamePrefix;
    private final Set supportedAnnotationNames;
    private final Set specialCaseAnnotations;
    private final Class classAnno;
    private final Class methodAnno;
    private final Class polyAnno;
    private final Class varAnno;
    private final Class wildAnno;
    private final Q top;
    private final Q bottom;
    private final Q defaultQual;

    /**
     * Construct a configuration object
     *
     * @param lowerOp the operation to perform on the lower bound when combining annotations
     * @param upperOp the operation to perform on the upper bound when combining annotations
     * @param multiAnnoNamePrefix the package and class name prefix for repeatable annotations
     * @param supportedAnnotationNames a list of supported annotations specific to the type system
     * @param specialCaseAnnotations a list of annotations to be processed solely by the specialCaseProcess method
     * @param classAnno the annotation for class parameter declaration
     * @param methodAnno the annotation for method parameter declaration
     * @param polyAnno the poly annotation for the type system
     * @param varAnno the polymorphic qualifier use variable
     * @param wildAnno the annotation for specifying a wildcard
     * @param top the top qualifier in the system
     * @param bottom the bottom qualifier in the system
     * @param defaultQual the qualifier to use if no annotations result in a qualifier
     */
    public AnnotationConverterConfiguration(CombiningOperation lowerOp,
            CombiningOperation upperOp,
            String multiAnnoNamePrefix,
            Set supportedAnnotationNames,
            Set specialCaseAnnotations,
            Class classAnno,
            Class methodAnno,
            Class polyAnno,
            Class varAnno,
            Class wildAnno,
            Q top,
            Q bottom,
            Q defaultQual) {

        this.lowerOp = lowerOp;
        this.upperOp = upperOp;
        this.multiAnnoNamePrefix = multiAnnoNamePrefix;
        this.supportedAnnotationNames = supportedAnnotationNames;
        this.specialCaseAnnotations = specialCaseAnnotations;
        this.classAnno = classAnno;
        this.methodAnno = methodAnno;
        this.polyAnno = polyAnno;
        this.varAnno = varAnno;
        this.wildAnno = wildAnno;
        this.top = top;
        this.bottom = bottom;
        this.defaultQual = defaultQual;
    }


    public CombiningOperation getLowerOp() {
        return lowerOp;
    }

    public CombiningOperation getUpperOp() {
        return upperOp;
    }

    public String getMultiAnnoNamePrefix() {
        return multiAnnoNamePrefix;
    }

    public Set getSupportedAnnotationNames() {
        return supportedAnnotationNames;
    }

    public Set getSpecialCaseAnnotations() {
        return specialCaseAnnotations;
    }

    public Class getClassAnno() {
        return classAnno;
    }

    public Class getMethodAnno() {
        return methodAnno;
    }

    public Class getPolyAnno() {
        return polyAnno;
    }

    public Class getVarAnno() {
        return varAnno;
    }

    public Class getWildAnno() {
        return wildAnno;
    }

    public Q getTop() {
        return top;
    }

    public Q getBottom() {
        return bottom;
    }

    public Q getDefaultQual() {
        return defaultQual;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy