public class ASceneWrapper extends Object
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 and Description|
|Modifier and Type||Method and Description|
Avoid using this if possible; use the other methods of this class unless you absolutely need an AScene.
Updates the symbol information stored in AClass for the given class.
Write the scene wrapped by this object to a file at the given path.
public ASceneWrapper(scenelib.annotations.el.AScene theScene)
theScene- the scene to wrap
public void writeToFile(String jaifPath, WholeProgramInferenceScenesStorage.AnnotationsInContexts annosToIgnore, WholeProgramInference.OutputFormat outputFormat, BaseTypeChecker checker)
jaifPath- the path of the file to be written, but ending in ".jaif". If
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
public void updateSymbolInformation(scenelib.annotations.el.AClass aClass, @Nullable com.sun.tools.javac.code.Symbol.ClassSymbol classSymbol)
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
public scenelib.annotations.el.AScene getAScene()