Class DynamicType.Default.Dispatcher.ForJava7CapableVm

    • Field Detail

      • toPath

        private final java.lang.reflect.Method toPath
        The java.io.File#toPath() method.
      • move

        private final java.lang.reflect.Method move
        The java.nio.Files#copy(Path,Path,CopyOption[]) method.
      • copyOptions

        private final java.lang.Object[] copyOptions
        The copy options to apply.
    • Constructor Detail

      • ForJava7CapableVm

        protected ForJava7CapableVm​(java.lang.reflect.Method toPath,
                                    java.lang.reflect.Method move,
                                    java.lang.Object[] copyOptions)
        Creates a new NIO2 capable dispatcher.
        Parameters:
        toPath - The java.io.File#toPath() method.
        move - The java.nio.Files#move(Path,Path,CopyOption[]) method.
        copyOptions - The copy options to apply.
    • Method Detail

      • copy

        public boolean copy​(java.io.File source,
                            java.io.File target)
                     throws java.io.IOException
        Copies the source file to the target location.
        Specified by:
        copy in interface DynamicType.Default.Dispatcher
        Parameters:
        source - The source file.
        target - The target file.
        Returns:
        true if the source file needs to be deleted.
        Throws:
        java.io.IOException - If an I/O error occurs.