Class StubGenerator
java.lang.Object
org.checkerframework.framework.stub.StubGenerator
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 Summary
ConstructorDescriptionConstructs aStubGenerator
that outputs toSystem.out
.Constructs aStubGenerator
that outputs to the provided output stream.StubGenerator
(PrintStream out) Constructs aStubGenerator
that outputs to the provided output stream. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
The main entry point to StubGenerator.void
stubFromField
(Element elt) Generate the stub file for all the classes within the provided package.void
Generate the stub file for all the classes within the package that containselt
.void
stubFromPackage
(PackageElement packageElement) Generate the stub file for all the classes within the provided package.void
stubFromType
(TypeElement typeElement) Generate the stub file for provided class.
-
Constructor Details
-
StubGenerator
public StubGenerator()Constructs aStubGenerator
that outputs toSystem.out
. -
StubGenerator
Constructs aStubGenerator
that outputs to the provided output stream.- Parameters:
out
- the output stream
-
StubGenerator
Constructs aStubGenerator
that outputs to the provided output stream.- Parameters:
out
- the output stream
-
-
Method Details
-
stubFromField
Generate the stub file for all the classes within the provided package. -
stubFromPackage
Generate the stub file for all the classes within the provided package. -
stubFromMethod
Generate the stub file for all the classes within the package that containselt
.- Parameters:
elt
- a method or constructor; generate stub files for its package
-
stubFromType
Generate the stub file for provided class. The generated file includes the package name. -
main
The main entry point to StubGenerator.- Parameters:
args
- command-line arguments
-