Class StubGenerator
- java.lang.Object
-
- org.checkerframework.framework.stub.StubGenerator
-
public class StubGenerator extends java.lang.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 Summary
Constructors Constructor Description StubGenerator()
Constructs aStubGenerator
that outputs toSystem.out
.StubGenerator(java.io.OutputStream out)
Constructs aStubGenerator
that outputs to the provided output stream.StubGenerator(java.io.PrintStream out)
Constructs aStubGenerator
that outputs to the provided output stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
The main entry point to StubGenerator.void
stubFromField(javax.lang.model.element.Element elt)
Generate the stub file for all the classes within the provided package.void
stubFromMethod(javax.lang.model.element.ExecutableElement elt)
Generate the stub file for all the classes within the package that containselt
.void
stubFromPackage(javax.lang.model.element.PackageElement packageElement)
Generate the stub file for all the classes within the provided package.void
stubFromType(javax.lang.model.element.TypeElement typeElement)
Generate the stub file for provided class.
-
-
-
Constructor Detail
-
StubGenerator
public StubGenerator()
Constructs aStubGenerator
that outputs toSystem.out
.
-
StubGenerator
public StubGenerator(java.io.PrintStream out)
Constructs aStubGenerator
that outputs to the provided output stream.- Parameters:
out
- the output stream
-
StubGenerator
public StubGenerator(java.io.OutputStream out)
Constructs aStubGenerator
that outputs to the provided output stream.- Parameters:
out
- the output stream
-
-
Method Detail
-
stubFromField
public void stubFromField(javax.lang.model.element.Element elt)
Generate the stub file for all the classes within the provided package.
-
stubFromPackage
public void stubFromPackage(javax.lang.model.element.PackageElement packageElement)
Generate the stub file for all the classes within the provided package.
-
stubFromMethod
public void stubFromMethod(javax.lang.model.element.ExecutableElement elt)
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
public void stubFromType(javax.lang.model.element.TypeElement typeElement)
Generate the stub file for provided class. The generated file includes the package name.
-
main
public static void main(java.lang.String[] args)
The main entry point to StubGenerator.- Parameters:
args
- command-line arguments
-
-