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
ConstructorsConstructorDescriptionConstructs aStubGeneratorthat outputs toSystem.out.Constructs aStubGeneratorthat outputs to the provided output stream.StubGenerator(PrintStream out) Constructs aStubGeneratorthat outputs to the provided output stream. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidThe main entry point to StubGenerator.voidstubFromField(Element elt) Generate the stub file for all the classes within the provided package.voidGenerate the stub file for all the classes within the package that containselt.voidstubFromPackage(PackageElement packageElement) Generate the stub file for all the classes within the provided package.voidstubFromType(TypeElement typeElement) Generate the stub file for provided class.
-
Constructor Details
-
StubGenerator
public StubGenerator()Constructs aStubGeneratorthat outputs toSystem.out. -
StubGenerator
Constructs aStubGeneratorthat outputs to the provided output stream.- Parameters:
out- the output stream
-
StubGenerator
Constructs aStubGeneratorthat 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
-