Class JavaStubifier
- java.lang.Object
-
- org.checkerframework.framework.stub.JavaStubifier
-
public class JavaStubifier extends java.lang.Object
Process Java source files in a directory to produce, in-place, minimal stub files.To process a file means to remove:
- everything that is private or package-private,
- all comments, except for an initial copyright header,
- all method bodies,
- all field initializers,
- all initializer blocks,
- attributes to the
Deprecated
annotation (to be Java 8 compatible).
-
-
Constructor Summary
Constructors Constructor Description JavaStubifier()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.nio.file.Path
dirnameToPath(java.lang.String dir)
Converts a directory name to a path.static void
main(java.lang.String[] args)
Processes each provided command-line argument; see class documentation for details.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Processes each provided command-line argument; see class documentation for details.- Parameters:
args
- command-line arguments: directories to process
-
dirnameToPath
public static java.nio.file.Path dirnameToPath(java.lang.String dir)
Converts a directory name to a path. It issues a warning and terminates the program if the argument does not exist or is not a directory.Unlike
Paths.get
, it handles "." which means the current directory in Unix.- Parameters:
dir
- a directory name- Returns:
- a path for the directory name
-
-