
org.checkerframework.dataflow.cfg.node.ImplicitThisNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataflow-shaded Show documentation
Show all versions of dataflow-shaded Show documentation
dataflow-shaded is a dataflow framework based on the javac compiler.
It differs from the org.checkerframework:dataflow artifact in two ways.
First, the packages in this artifact have been renamed to org.checkerframework.shaded.*.
Second, unlike the dataflow artifact, this artifact contains the dependencies it requires.
package org.checkerframework.dataflow.cfg.node;
import com.sun.source.tree.Tree;
import org.checkerframework.checker.nullness.qual.Nullable;
import javax.lang.model.type.TypeMirror;
/** A node to model the implicit {@code this}, e.g., in a field access. */
public class ImplicitThisNode extends ThisNode {
public ImplicitThisNode(TypeMirror type) {
super(type);
}
@Override
public @Nullable Tree getTree() {
return null;
}
@Override
public R accept(NodeVisitor visitor, P p) {
return visitor.visitImplicitThis(this, p);
}
// In an inner class context, an implicit this may need to be represented as "Outer.this" rather
// than just as "this". This is context-dependent, and toString doesn't know if it is being
// used in an inner class context.
@Override
public String toString() {
return "(this)";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy