public class ASceneWrapper extends Object
scene-lib (from the Annotation File Utilities) doesn't provide enough information to usefully print stub files: it lacks information about what is and is not an enum, about the base types of variables, and about formal parameter names.

This class wraps AScene but provides access to that missing information. This allows us to preserve the code that generates .jaif files, while allowing us to sanely and safely keep the information we need to generate stubs.

This class would be better as a subclass of AScene.

  • Constructor Details

    • ASceneWrapper

      public ASceneWrapper(org.checkerframework.afu.scenelib.el.AScene theScene)
      Constructor. Pass the AScene to wrap.
      theScene - the scene to wrap
  • Method Details

    • writeToFile

      public void writeToFile(String jaifPath, WholeProgramInferenceScenesStorage.AnnotationsInContexts annosToIgnore, WholeProgramInference.OutputFormat outputFormat, BaseTypeChecker checker)
      Write the scene wrapped by this object to a file at the given path.
      jaifPath - the path of the file to be written, but ending in ".jaif". If outputformat is not JAIF, the path will be modified to match.
      annosToIgnore - which annotations should be ignored in which contexts
      outputFormat - the output format to use
      checker - the checker from which this method is called, for naming stub files
    • updateSymbolInformation

      public void updateSymbolInformation(org.checkerframework.afu.scenelib.el.AClass aClass, @Nullable classSymbol)
      Updates the symbol information stored in AClass for the given class. May be called multiple times (and needs to be if the second parameter was null the first time it was called; only some calls provide the symbol information).
      aClass - the class representation in which the symbol information is to be updated
      classSymbol - the source of the symbol information; may be null, in which case this method does nothing
    • getAScene

      public org.checkerframework.afu.scenelib.el.AScene getAScene()
      Avoid using this if possible; use the other methods of this class unless you absolutely need an AScene.
      the AScene representation of this