Skip to content

Commit

Permalink
Merge pull request #28 from Electrostat-Lab/electrostatic4j-migration
Browse files Browse the repository at this point in the history
Migrated to electrostatic4j as a part of the binding API
  • Loading branch information
pavly-gerges authored Aug 4, 2024
2 parents 848115e + 515537f commit 91fbefc
Show file tree
Hide file tree
Showing 42 changed files with 124 additions and 126 deletions.
16 changes: 8 additions & 8 deletions snaploader-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@ if (System.getProperty("os.name").contains("Windows")) {
}

application {
mainClass = 'electrostatic.snaploader.examples.TestBasicFeatures'
mainClass = 'electrostatic4j.snaploader.examples.TestBasicFeatures'
}

tasks.register("TestBasicFeatures") {
application.mainClass = 'electrostatic.snaploader.examples.TestBasicFeatures'
application.mainClass = 'electrostatic4j.snaploader.examples.TestBasicFeatures'
}

tasks.register("TestBasicFeatures2") {
application.mainClass = 'electrostatic.snaploader.examples.TestBasicFeatures2'
application.mainClass = 'electrostatic4j.snaploader.examples.TestBasicFeatures2'
}

tasks.register("MonitorableExample") {
application.mainClass = 'electrostatic.snaploader.examples.MonitorableExample'
application.mainClass = 'electrostatic4j.snaploader.examples.MonitorableExample'
}

tasks.register("ReflectiveLauncher") {
application.mainClass = 'electrostatic.snaploader.examples.ReflectiveLauncher'
application.mainClass = 'electrostatic4j.snaploader.examples.ReflectiveLauncher'
}

tasks.register("TestMultipleLoads") {
application.mainClass = 'electrostatic.snaploader.examples.TestMultipleLoads'
application.mainClass = 'electrostatic4j.snaploader.examples.TestMultipleLoads'
}

tasks.register("TestZipExtractor") {
application.mainClass = 'electrostatic.snaploader.examples.TestZipExtractor'
application.mainClass = 'electrostatic4j.snaploader.examples.TestZipExtractor'
}

tasks.register("TestMultiThreading") {
application.mainClass = 'electrostatic.snaploader.examples.TestMultiThreading'
application.mainClass = 'electrostatic4j.snaploader.examples.TestMultiThreading'
}

task copyLibs(type: Copy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
* Monitorable example for jconsole sessions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand All @@ -39,7 +39,7 @@
* Reflective launching is a generic way to execute
* test examples and tech demos from the command-line
* interfaces using the Gradle API. (E.g.: └──╼ $./gradlew :snaploader-examples:ReflectiveLauncher
* :snaploader-examples:run --args="electrostatic.snaploader.examples.TestBasicFeatures2").
* :snaploader-examples:run --args="examples.electrostatic4j.snaploader.TestBasicFeatures2").
*
* @author pavl_g
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import java.io.IOException;

import electrostatic.snaploader.LibraryInfo;
import electrostatic.snaploader.NativeBinaryLoader;
import electrostatic.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic.snaploader.platform.util.NativeVariant;
import electrostatic.snaploader.platform.util.PlatformPredicate;
import electrostatic.snaploader.platform.util.PropertiesProvider;
import electrostatic.snaploader.LoadingCriterion;
import electrostatic4j.snaploader.LibraryInfo;
import electrostatic4j.snaploader.NativeBinaryLoader;
import electrostatic4j.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.platform.util.NativeVariant;
import electrostatic4j.snaploader.platform.util.PlatformPredicate;
import electrostatic4j.snaploader.platform.util.PropertiesProvider;
import electrostatic4j.snaploader.LoadingCriterion;

/**
* Tests basic features of the {@link NativeBinaryLoader} API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.Files;
import electrostatic.snaploader.LibraryInfo;
import electrostatic.snaploader.NativeBinaryLoader;
import electrostatic.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic.snaploader.platform.util.NativeVariant;
import electrostatic.snaploader.platform.util.PlatformPredicate;
import electrostatic.snaploader.platform.util.PropertiesProvider;
import electrostatic.snaploader.LoadingCriterion;
import electrostatic4j.snaploader.LibraryInfo;
import electrostatic4j.snaploader.NativeBinaryLoader;
import electrostatic4j.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.platform.util.NativeVariant;
import electrostatic4j.snaploader.platform.util.PlatformPredicate;
import electrostatic4j.snaploader.platform.util.PropertiesProvider;
import electrostatic4j.snaploader.LoadingCriterion;

/**
* A finer version of {@link TestBasicFeatures} utilizing the platform-independent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package electrostatic.snaploader.examples;

import electrostatic.snaploader.LibraryInfo;
import electrostatic.snaploader.LoadingCriterion;
import electrostatic.snaploader.NativeBinaryLoader;
import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic.snaploader.platform.util.NativeVariant;
import electrostatic.snaploader.platform.util.PlatformPredicate;
import electrostatic.snaploader.platform.util.PropertiesProvider;
package electrostatic4j.snaploader.examples;

import electrostatic4j.snaploader.LibraryInfo;
import electrostatic4j.snaploader.LoadingCriterion;
import electrostatic4j.snaploader.NativeBinaryLoader;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic4j.snaploader.platform.util.NativeVariant;
import electrostatic4j.snaploader.platform.util.PlatformPredicate;
import electrostatic4j.snaploader.platform.util.PropertiesProvider;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import electrostatic.snaploader.filesystem.FileExtractionListener;
import electrostatic.snaploader.filesystem.FileExtractor;
import electrostatic.snaploader.filesystem.FileLocator;
import electrostatic.snaploader.filesystem.ZipCompressionType;
import electrostatic.snaploader.platform.util.PropertiesProvider;
import electrostatic.snaploader.util.SnapLoaderLogger;
import electrostatic4j.snaploader.filesystem.FileExtractionListener;
import electrostatic4j.snaploader.filesystem.FileExtractor;
import electrostatic4j.snaploader.filesystem.FileLocator;
import electrostatic4j.snaploader.filesystem.ZipCompressionType;
import electrostatic4j.snaploader.platform.util.PropertiesProvider;
import electrostatic4j.snaploader.util.SnapLoaderLogger;

import java.io.IOException;
import java.util.logging.Level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import java.io.IOException;
import java.util.Arrays;

import electrostatic.snaploader.LoadingCriterion;
import electrostatic.snaploader.ConcurrentNativeBinaryLoader;
import electrostatic.snaploader.throwable.UnSupportedSystemError;
import electrostatic.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.LoadingCriterion;
import electrostatic4j.snaploader.ConcurrentNativeBinaryLoader;
import electrostatic4j.snaploader.throwable.UnSupportedSystemError;
import electrostatic4j.snaploader.platform.util.DefaultDynamicLibraries;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;

/**
* Tests multi-threading and thread locks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,16 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.examples;
package electrostatic4j.snaploader.examples;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

import electrostatic.snaploader.filesystem.FileExtractionListener;
import electrostatic.snaploader.filesystem.FileExtractor;
import electrostatic.snaploader.filesystem.FileLocator;
import electrostatic.snaploader.filesystem.ZipCompressionType;
import electrostatic.snaploader.platform.util.PropertiesProvider;
import electrostatic.snaploader.throwable.FilesystemResourceScavengingException;
import electrostatic4j.snaploader.filesystem.FileExtractionListener;
import electrostatic4j.snaploader.filesystem.FileExtractor;
import electrostatic4j.snaploader.filesystem.FileLocator;
import electrostatic4j.snaploader.filesystem.ZipCompressionType;
import electrostatic4j.snaploader.platform.util.PropertiesProvider;
import electrostatic4j.snaploader.throwable.FilesystemResourceScavengingException;

/**
* Tests extracting an image compression from a Zip compression type filesystem using {@link FileExtractor} API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader;
package electrostatic4j.snaploader;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;
import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;

/**
* A thread-safe implementation for the NativeBinaryLoader.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader;
package electrostatic4j.snaploader;

import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;

/**
* Provides a platform-independent library placeholder with an adjustable baseName {@link LibraryInfo#baseName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader;
package electrostatic4j.snaploader;

/**
* Represents an extraction/loading criterion type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader;
package electrostatic4j.snaploader;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.lang.UnsatisfiedLinkError;
import electrostatic.snaploader.filesystem.FileExtractionListener;
import electrostatic.snaploader.filesystem.FileExtractor;
import electrostatic.snaploader.filesystem.FileLocalizingListener;
import electrostatic.snaploader.filesystem.FileLocator;
import electrostatic.snaploader.library.LibraryExtractor;
import electrostatic.snaploader.library.LibraryLocator;
import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic.snaploader.platform.util.NativeVariant;
import electrostatic.snaploader.throwable.UnSupportedSystemError;
import electrostatic.snaploader.util.SnapLoaderLogger;
import electrostatic4j.snaploader.filesystem.FileExtractionListener;
import electrostatic4j.snaploader.filesystem.FileExtractor;
import electrostatic4j.snaploader.filesystem.FileLocalizingListener;
import electrostatic4j.snaploader.filesystem.FileLocator;
import electrostatic4j.snaploader.library.LibraryExtractor;
import electrostatic4j.snaploader.library.LibraryLocator;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.platform.util.NativeVariant;
import electrostatic4j.snaploader.throwable.UnSupportedSystemError;
import electrostatic4j.snaploader.util.SnapLoaderLogger;

/**
* A cross-platform utility for extracting and loading native binaries based on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader;
package electrostatic4j.snaploader;

import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;

/**
* Provides executable functions binding the user applications to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader;
package electrostatic4j.snaploader;

import electrostatic.snaploader.platform.NativeDynamicLibrary;
import electrostatic.snaploader.throwable.UnSupportedSystemError;
import electrostatic4j.snaploader.platform.NativeDynamicLibrary;
import electrostatic4j.snaploader.throwable.UnSupportedSystemError;

/**
* Provides executable functions binding the user applications to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.filesystem;
package electrostatic4j.snaploader.filesystem;

import java.io.FileNotFoundException;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.filesystem;
package electrostatic4j.snaploader.filesystem;

/**
* Provides executable functions ensuring tight binding the user applications to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.filesystem;
package electrostatic4j.snaploader.filesystem;

import electrostatic.snaploader.throwable.FilesystemResourceInitializationException;
import electrostatic.snaploader.util.SnapLoaderLogger;
import electrostatic4j.snaploader.throwable.FilesystemResourceInitializationException;
import electrostatic4j.snaploader.util.SnapLoaderLogger;

import java.io.*;
import java.util.logging.Level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.filesystem;
package electrostatic4j.snaploader.filesystem;

/**
* Provides executable functions by the file locator API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.filesystem;
package electrostatic4j.snaploader.filesystem;

import electrostatic.snaploader.throwable.FilesystemResourceInitializationException;
import electrostatic.snaploader.util.SnapLoaderLogger;
import electrostatic4j.snaploader.throwable.FilesystemResourceInitializationException;
import electrostatic4j.snaploader.util.SnapLoaderLogger;

import java.io.*;
import java.util.logging.Level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package electrostatic.snaploader.filesystem;
package electrostatic4j.snaploader.filesystem;

import java.io.InputStream;

Expand Down
Loading

0 comments on commit 91fbefc

Please sign in to comment.