Search in sources :

Example 1 with ImplicitsTreeAnnotator

use of org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator in project checker-framework by typetools.

the class ReflectionTestAnnotatedTypeFactory method createTreeAnnotator.

@Override
public TreeAnnotator createTreeAnnotator() {
    ImplicitsTreeAnnotator implicitsTreeAnnotator = new ImplicitsTreeAnnotator(this);
    AnnotationMirror bottom = AnnotationBuilder.fromClass(elements, ReflectBottom.class);
    implicitsTreeAnnotator.addTreeKind(com.sun.source.tree.Tree.Kind.NULL_LITERAL, bottom);
    implicitsTreeAnnotator.addTreeKind(com.sun.source.tree.Tree.Kind.INT_LITERAL, bottom);
    return new ListTreeAnnotator(new PropagationTreeAnnotator(this), implicitsTreeAnnotator);
}
Also used : ImplicitsTreeAnnotator(org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator) AnnotationMirror(javax.lang.model.element.AnnotationMirror) PropagationTreeAnnotator(org.checkerframework.framework.type.treeannotator.PropagationTreeAnnotator) ListTreeAnnotator(org.checkerframework.framework.type.treeannotator.ListTreeAnnotator)

Example 2 with ImplicitsTreeAnnotator

use of org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator in project checker-framework by typetools.

the class FlowTestAnnotatedTypeFactory method createTreeAnnotator.

@Override
public TreeAnnotator createTreeAnnotator() {
    ImplicitsTreeAnnotator implicitsTreeAnnotator = new ImplicitsTreeAnnotator(this);
    implicitsTreeAnnotator.addTreeKind(com.sun.source.tree.Tree.Kind.NULL_LITERAL, BOTTOM);
    return new ListTreeAnnotator(new PropagationTreeAnnotator(this), implicitsTreeAnnotator);
}
Also used : ImplicitsTreeAnnotator(org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator) PropagationTreeAnnotator(org.checkerframework.framework.type.treeannotator.PropagationTreeAnnotator) ListTreeAnnotator(org.checkerframework.framework.type.treeannotator.ListTreeAnnotator)

Example 3 with ImplicitsTreeAnnotator

use of org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator in project checker-framework by typetools.

the class WholeProgramInferenceTestAnnotatedTypeFactory method createTreeAnnotator.

@Override
public TreeAnnotator createTreeAnnotator() {
    ImplicitsTreeAnnotator implicitsTreeAnnotator = new ImplicitsTreeAnnotator(this);
    implicitsTreeAnnotator.addTreeKind(com.sun.source.tree.Tree.Kind.NULL_LITERAL, BOTTOM);
    implicitsTreeAnnotator.addTreeKind(com.sun.source.tree.Tree.Kind.INT_LITERAL, BOTTOM);
    return new ListTreeAnnotator(new PropagationTreeAnnotator(this), implicitsTreeAnnotator);
}
Also used : ImplicitsTreeAnnotator(org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator) PropagationTreeAnnotator(org.checkerframework.framework.type.treeannotator.PropagationTreeAnnotator) ListTreeAnnotator(org.checkerframework.framework.type.treeannotator.ListTreeAnnotator)

Example 4 with ImplicitsTreeAnnotator

use of org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator in project checker-framework by typetools.

the class NullnessAnnotatedTypeFactory method createTreeAnnotator.

@Override
protected TreeAnnotator createTreeAnnotator() {
    // Don't call super.createTreeAnnotator because the default tree annotators are incorrect
    // for the Nullness Checker.
    ImplicitsTreeAnnotator implicitsTreeAnnotator = new ImplicitsTreeAnnotator(this);
    implicitsTreeAnnotator.addTreeKind(Tree.Kind.NEW_CLASS, NONNULL);
    implicitsTreeAnnotator.addTreeKind(Tree.Kind.NEW_ARRAY, NONNULL);
    return new ListTreeAnnotator(// DebugListTreeAnnotator(new Tree.Kind[] {Tree.Kind.CONDITIONAL_EXPRESSION},
    new NullnessPropagationAnnotator(this), implicitsTreeAnnotator, new NullnessTreeAnnotator(this), new CommitmentTreeAnnotator(this));
}
Also used : ImplicitsTreeAnnotator(org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator) ListTreeAnnotator(org.checkerframework.framework.type.treeannotator.ListTreeAnnotator)

Example 5 with ImplicitsTreeAnnotator

use of org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator in project checker-framework by typetools.

the class TestAnnotatedTypeFactory method createTreeAnnotator.

@Override
public TreeAnnotator createTreeAnnotator() {
    ImplicitsTreeAnnotator implicitsTreeAnnotator = new ImplicitsTreeAnnotator(this);
    implicitsTreeAnnotator.addTreeKind(com.sun.source.tree.Tree.Kind.NULL_LITERAL, BOTTOM);
    return new ListTreeAnnotator(new PropagationTreeAnnotator(this), implicitsTreeAnnotator);
}
Also used : ImplicitsTreeAnnotator(org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator) PropagationTreeAnnotator(org.checkerframework.framework.type.treeannotator.PropagationTreeAnnotator) ListTreeAnnotator(org.checkerframework.framework.type.treeannotator.ListTreeAnnotator)

Aggregations

ImplicitsTreeAnnotator (org.checkerframework.framework.type.treeannotator.ImplicitsTreeAnnotator)5 ListTreeAnnotator (org.checkerframework.framework.type.treeannotator.ListTreeAnnotator)5 PropagationTreeAnnotator (org.checkerframework.framework.type.treeannotator.PropagationTreeAnnotator)4 AnnotationMirror (javax.lang.model.element.AnnotationMirror)1