public final class SceneToStubWriter extends Object
AScenein stub file format to a file
write(ASceneWrapper,String). This class is the equivalent of
IndexFileWriterfrom the Annotation File Utilities, but outputs the results in the stub file format instead of jaif format. This class is not part of the Annotation File Utilities, a library for manipulating .jaif files, because it has nothing to do with .jaif files.
This class works by taking as input a scene-lib representation of a type augmented with
additional information, stored in javac's format (e.g. as TypeMirrors or Elements).
ASceneWrapper stores this additional information. This class walks the scene-lib representation
structurally and outputs the stub file as a string, by combining the information scene-lib stores
with the information gathered elsewhere.
The additional information is necessary because the scene-lib representation of a type does not have enough information to print full types.
This writer is used instead of
IndexFileWriter if the
command-line argument is present.
|Modifier and Type||Method and Description|
Returns the String representation of an annotation in Java source format.
Writes the annotations in
public static void write(ASceneWrapper scene, String filename)
outin stub file format.
scene- the scene to write out
filename- the name of the file to write (must end with .astub)
public static String formatAnnotation(scenelib.annotations.Annotation a)
a- the annotation to print