@HashCodeAndEqualsPlugin.Enhance public static class DynamicType.Default.Dispatcher.ForJava7CapableVm extends java.lang.Object implements DynamicType.Default.Dispatcher
DynamicType.Default.Dispatcher.CreationAction, DynamicType.Default.Dispatcher.ForJava7CapableVm, DynamicType.Default.Dispatcher.ForLegacyVm
Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
copyOptions
The copy options to apply.
|
private java.lang.reflect.Method |
move
The
java.nio.Files#copy(Path,Path,CopyOption[]) method. |
private java.lang.reflect.Method |
toPath
The
java.io.File#toPath() method. |
Modifier | Constructor and Description |
---|---|
protected |
ForJava7CapableVm(java.lang.reflect.Method toPath,
java.lang.reflect.Method move,
java.lang.Object[] copyOptions)
Creates a new NIO2 capable dispatcher.
|
Modifier and Type | Method and Description |
---|---|
boolean |
copy(java.io.File source,
java.io.File target)
Copies the source file to the target location.
|
private final java.lang.reflect.Method toPath
java.io.File#toPath()
method.private final java.lang.reflect.Method move
java.nio.Files#copy(Path,Path,CopyOption[])
method.private final java.lang.Object[] copyOptions
protected ForJava7CapableVm(java.lang.reflect.Method toPath, java.lang.reflect.Method move, java.lang.Object[] copyOptions)
toPath
- The java.io.File#toPath()
method.move
- The java.nio.Files#move(Path,Path,CopyOption[])
method.copyOptions
- The copy options to apply.public boolean copy(java.io.File source, java.io.File target) throws java.io.IOException
copy
in interface DynamicType.Default.Dispatcher
source
- The source file.target
- The target file.true
if the source file needs to be deleted.java.io.IOException
- If an I/O error occurs.