Sign in

I’m a software engineer and a Java developer

Tested on Java versions ranging from 8 to 17-ea, Burningwave Core is a fully independent, advanced, free and open source Java frameworks building library and it is useful for scanning class paths, generating classes at runtime, facilitating the use of reflection, scanning the filesystem, executing stringified source code and much more…

Burningwave Core contains THE MOST POWERFUL CLASS PATHS SCANNER with which it’s possible to search classes by every criteria that your imagination can make by using lambda expressions. Scan engine is highly optimized using direct allocated ByteBuffers to avoid heap saturation; searches are executed in multithreading context and are…


With ClassFactory it is possible to generate classes at runtime, but how we can do if we only need to compile sources without loading them or just generate sources?

Here they come to our aid the source code generator components and the JavaMemoryCompiler of Burningwave Core. With source code generators we can generate source code and store it on the drive or compile it via the JavaMemoryCompiler.

To use all these components you should simply add the following to your projects dependencies:

Now we are going to generate and store the following class:

… With the following source…


With Burningwave Tools it is possible to perform dependencies shrinking and also to make applications created with old java versions work on java 9 and later versions. To adapt applications to java 9 and later you must create an application adapater and run it with a jdk 9 or later. In this application adapter you must load, by using PathHelper, the jdk libraries by which the target application was developed and pass to the method captureAndStore of TwoPassCapturer component, as first parameter, the name of the class of your application that contains the main method. …


For methods handling we are going to use Methods component; Methods component uses to cache all methods and all method handles for faster access. In order to accomplish the task, we initially need to add the following dependency to our pom.xml:

Let’s take a look at the code now:

We learned how to handle methods; the complete source is available here and for more articles about Burningwave Core you can go to the main page.


To bind methods or constructors to functional interfaces we are going to use the FunctionalInterfaceFactory. FunctionalInterfaceFactory component uses to cache all generated functional interfaces for faster access. First of all we must add the following dependency to our pom.xml:

Constructors binding

To bind constructors to functional interfaces we will use the following constructors:

… And now let’s see the code needed to bind and call the generated functional interfaces:

Methods binding

To bind methods to functional interfaces we will use the following methods:

… And now let’s see the code needed to bind and call the generated functional interfaces:

Binding to methods with boolean return


Overview

In this tutorial we will talk about a new class paths scanning engine and how to use it: the ClassHunter of Burningwave Core, a Java library useful for building frameworks. This class paths scanning engine gives the ability to search classes over paths or the runtime class paths by concatenable and nestable criteria using the lambda expressions on the native Java reflection elements such as Class, Field, Method, Constructor, Module, Package, Annotation.

Maven Dependencies

First, let’s add the Burningwave Core library to our pom.xml:

Usage

Now we are going to find all classes of a package and in particular all classes, in…


Overview

This article will guide you to understand and build a lightweight Java application using your own Dependency Injection implementation.

Dependency Injection … DI… Inversion Of Control…IoC, I guess you might have heard these names so many times while your regular routine or specially interview preparation time that you wonder what exactly it is.

But if you really want to understand how internally it works then continue reading here.

So, what is dependency injection?

Dependency injection is a design pattern used to implement IoC, in which instance variables (ie. dependencies) of an object got created and assigned by the framework.

To use DI feature a class…


To get field values from an object in Java we are going to use Fields component of Burningwave Core, a fully independent, advanced, free and open source Java frameworks building library that is useful for scanning class paths, generating classes at runtime, facilitating the use of reflection, scanning the filesystem, executing stringified source code and much more…

To use Burningwave Core you should simply add the following to your projects dependencies:

Fields component uses to cache all fields for faster access and in this code snippet we show how to handle the fields of any Java object even of…


To find all classes of a package in Java we need to use the ClassHunter of Burningwave Core library. The ClassHunter is a classpath scan engine that queries iterated classes and returns only the classes that match a chosen criteria, moreover the searches are executed in a multithread context and recursively through folder and supported compressed files (zip, jar, jmod, war and ear) even in nested compressed files. To use the ClassHunter you should simply add the following to your projects dependencies:

To perform a scan it is necessary to create a configuration object of type SearchConfig to which…


Through FileSystemItem of Burningwave Core library you can reach a resource of the file system even if it is contained in a nested supported (zip, jar, war, ear and jmod) compressed archive and obtain the content of it or other informations such as if it is a folder or a file or a compressed archive or if it is a compressed entry or obtain, if it is a folder or a compressed archive, the direct children or all nested children or a filtered collection of them. You can retrieve a FileSystemItem through an absolute path or through a relative path…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store