Class WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos

java.lang.Object
org.checkerframework.common.wholeprograminference.WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos
All Implemented Interfaces:
org.plumelib.util.DeepCopyable<WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos>
Enclosing class:
WholeProgramInferenceJavaParserStorage

public static class WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos extends Object implements org.plumelib.util.DeepCopyable<WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos>
Stores wrappers for the locations where annotations may be inferred in a class or interface.
  • Field Details

  • Constructor Details

    • ClassOrInterfaceAnnos

      public ClassOrInterfaceAnnos(@BinaryName String className, @Nullable com.github.javaparser.ast.body.TypeDeclaration<?> javaParserNode)
      Create a new ClassOrInterfaceAnnos.
      Parameters:
      className - the binary name of the class
      javaParserNode - the JavaParser node corresponding to the class declaration, which is used for placing annotations on the class declaration
  • Method Details

    • deepCopy

      Specified by:
      deepCopy in interface org.plumelib.util.DeepCopyable<WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos>
    • addAnnotationToClassDeclaration

      public boolean addAnnotationToClassDeclaration(AnnotationMirror annotation)
      Adds annotation to the set of annotations on the declaration of this class.
      Parameters:
      annotation - an annotation (can be declaration or type)
      Returns:
      true if this is a new annotation for this class
    • transferAnnotations

      public void transferAnnotations()
      Transfers all annotations inferred by whole program inference for the methods and fields in the wrapper class or interface to their corresponding JavaParser locations.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringVerbose

      public String toStringVerbose()
      Returns a verbose printed representation of this.
      Returns:
      a verbose printed representation of this