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 |
---|
ASceneWrapper(scenelib.annotations.el.AScene theScene)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
scenelib.annotations.el.AScene |
getAScene()
Avoid using this if possible; use the other methods of this class unless you absolutely need an
AScene.
|
void |
updateSymbolInformation(scenelib.annotations.el.AClass aClass,
@Nullable com.sun.tools.javac.code.Symbol.ClassSymbol classSymbol)
Updates the symbol information stored in AClass for the given class.
|
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.
|
public ASceneWrapper(scenelib.annotations.el.AScene theScene)
theScene
- the scene to wrappublic 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 outputformat
is not JAIF
, the path will be modified to match.annosToIgnore
- which annotations should be ignored in which contextsoutputFormat
- the output format to usechecker
- the checker from which this method is called, for naming stub filespublic 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 updatedclassSymbol
- the source of the symbol information; may be null, in which case this method
does nothingpublic scenelib.annotations.el.AScene getAScene()