Package org.apache.sis.internal.unopkg
Class JavaMaker.Copier
- All Implemented Interfaces:
FileVisitor<Path>
- Enclosing class:
- JavaMaker
Copies
*.class files from source directory to output directory.
The output directory should already exist. It should be the case if all
sources files have been compiled before this method is invoked.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpreVisitDirectory(Path dir, BasicFileAttributes attrs) Determines whether the given directory should be visited.(package private) voidrun()Executes the copy operation.visitFile(Path file, BasicFileAttributes attrs) Invoked for a file in a directory.Methods inherited from class java.nio.file.SimpleFileVisitor
postVisitDirectory, visitFileFailed
-
Field Details
-
source
The root of source and target directories. Files belowsourcewill be copied with identical path (relative tosource) undertargetdirectory. -
target
The root of source and target directories. Files belowsourcewill be copied with identical path (relative tosource) undertargetdirectory. -
count
int countNumber of files copied.
-
-
Constructor Details
-
Copier
Creates a new copier.- Parameters:
baseDirectory- base directory of the module to compile.outputDirectory- directory where the output Java files will be located.
-
-
Method Details
-
run
Executes the copy operation.- Throws:
IOException
-
preVisitDirectory
Determines whether the given directory should be visited. This method skips hidden directories.- Specified by:
preVisitDirectoryin interfaceFileVisitor<Path>- Overrides:
preVisitDirectoryin classSimpleFileVisitor<Path>
-
visitFile
Invoked for a file in a directory. This method creates the directory if it does not exist and performs the actual copy operation.- Specified by:
visitFilein interfaceFileVisitor<Path>- Overrides:
visitFilein classSimpleFileVisitor<Path>- Throws:
IOException
-