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

checker.src.org.checkerframework.checker.formatter.FormatterAnalysis 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.checker.formatter;

import java.util.List;

import javax.lang.model.element.VariableElement;

import org.checkerframework.common.basetype.BaseTypeChecker;
import org.checkerframework.framework.flow.CFAbstractAnalysis;
import org.checkerframework.framework.flow.CFStore;
import org.checkerframework.framework.flow.CFValue;
import org.checkerframework.framework.type.AnnotatedTypeMirror;
import org.checkerframework.javacutil.Pair;

/**
 * Needed for flow analysis, to implement the {@link FormatUtil#asFormat} method.
 *
 * @author Konstantin Weitz
 */
public class FormatterAnalysis extends
        CFAbstractAnalysis {
    public FormatterAnalysis(BaseTypeChecker checker,
            FormatterAnnotatedTypeFactory factory,
            List> fieldValues) {
        super(checker, factory, fieldValues);
    }

    @Override
    public FormatterTransfer createTransferFunction() {
        return new FormatterTransfer(this,(FormatterChecker)checker);
    }

    @Override
    public CFStore createEmptyStore(boolean sequentialSemantics) {
        return new CFStore(this, sequentialSemantics);
    }

    @Override
    public CFStore createCopiedStore(CFStore s) {
        return new CFStore(this, s);
    }

    @Override
    public CFValue createAbstractValue(AnnotatedTypeMirror type) {
        return defaultCreateAbstractValue(this, type);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy