Class ToIndexFileConverter

java.lang.Object
com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
org.checkerframework.framework.stub.ToIndexFileConverter
All Implemented Interfaces:
com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>

public class ToIndexFileConverter extends com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
Convert a JAIF file plus a stub file into index files (JAIFs). Note that the resulting index files will not include annotation definitions, for which stubfiles do not generally provide complete information.

An instance of the class represents conversion of 1 stub file, but the static main(String[]) method converts multiple stub files, instantiating the class multiple times.

  • Constructor Summary

    Constructors
    Constructor
    Description
    ToIndexFileConverter(@Nullable com.github.javaparser.ast.PackageDeclaration pkgDecl, List<com.github.javaparser.ast.ImportDeclaration> importDecls, org.checkerframework.afu.scenelib.el.AScene scene)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Parse stub files and write out equivalent JAIFs.
    visit(com.github.javaparser.ast.body.AnnotationDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.body.ConstructorDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.body.EnumConstantDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.body.EnumDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.body.FieldDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.body.InitializerDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.body.MethodDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.expr.ObjectCreationExpr expr, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.expr.VariableDeclarationExpr expr, org.checkerframework.afu.scenelib.el.AElement elem)
     
    visit(com.github.javaparser.ast.stmt.BlockStmt stmt, org.checkerframework.afu.scenelib.el.AElement elem)
     

    Methods inherited from class com.github.javaparser.ast.visitor.GenericVisitorAdapter

    visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ToIndexFileConverter

      public ToIndexFileConverter(@Nullable com.github.javaparser.ast.PackageDeclaration pkgDecl, List<com.github.javaparser.ast.ImportDeclaration> importDecls, org.checkerframework.afu.scenelib.el.AScene scene)
      Parameters:
      pkgDecl - AST node for package declaration
      importDecls - AST nodes for import declarations
      scene - scene for visitor methods to fill in
  • Method Details

    • main

      public static void main(String[] args)
      Parse stub files and write out equivalent JAIFs. Note that the results do not include annotation definitions, for which stubfiles do not generally provide complete information.
      Parameters:
      args - name of JAIF with annotation definition, followed by names of stub files to be converted (if none given, program reads from standard input)
    • visit

      public Void visit(com.github.javaparser.ast.body.AnnotationDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.stmt.BlockStmt stmt, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.body.ConstructorDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.body.EnumConstantDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.body.EnumDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.body.FieldDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.body.InitializerDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.body.MethodDeclaration decl, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.expr.ObjectCreationExpr expr, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>
    • visit

      public Void visit(com.github.javaparser.ast.expr.VariableDeclarationExpr expr, org.checkerframework.afu.scenelib.el.AElement elem)
      Specified by:
      visit in interface com.github.javaparser.ast.visitor.GenericVisitor<Void,org.checkerframework.afu.scenelib.el.AElement>
      Overrides:
      visit in class com.github.javaparser.ast.visitor.GenericVisitorAdapter<Void,org.checkerframework.afu.scenelib.el.AElement>