Class StubGenerator

java.lang.Object
org.checkerframework.framework.stub.StubGenerator

public class StubGenerator extends Object
Generates a stub file from a single class or an entire package.

TODO: StubGenerator needs to be reimplemented, because it no longer works due to changes in JDK 9.

See the Checker Framework Manual:
Using stub classes
  • Constructor Details Link icon

    • StubGenerator Link icon

      public StubGenerator()
      Constructs a StubGenerator that outputs to System.out.
    • StubGenerator Link icon

      public StubGenerator(PrintStream out)
      Constructs a StubGenerator that outputs to the provided output stream.
      Parameters:
      out - the output stream
    • StubGenerator Link icon

      public StubGenerator(OutputStream out)
      Constructs a StubGenerator that outputs to the provided output stream.
      Parameters:
      out - the output stream
  • Method Details Link icon

    • stubFromField Link icon

      public void stubFromField(Element elt)
      Generate the stub file for all the classes within the provided package.
    • stubFromPackage Link icon

      public void stubFromPackage(PackageElement packageElement)
      Generate the stub file for all the classes within the provided package.
    • stubFromMethod Link icon

      public void stubFromMethod(ExecutableElement elt)
      Generate the stub file for all the classes within the package that contains elt.
      Parameters:
      elt - a method or constructor; generate stub files for its package
    • stubFromType Link icon

      public void stubFromType(TypeElement typeElement)
      Generate the stub file for provided class. The generated file includes the package name.
    • main Link icon

      public static void main(String[] args)
      The main entry point to StubGenerator.
      Parameters:
      args - command-line arguments