LombokExtensions is a library designed to provide useful classes for Lombok's @ExtensionMethod annotation.
LombokExtensions can be installed using JitPack.
To include LombokExtensions in your project, add the following to your build.gradle file:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'de.phoenixmitx:LombokExtensions:VERSION'
}
For those who are still using Maven as their build tool, here's an example of how to include LombokExtensions in your project:
First, you need to add the JitPack repository to your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Next, you can add the LombokExtensions library as a dependency:
<dependency>
<groupId>de.phoenixmitx</groupId>
<artifactId>LombokExtensions</artifactId>
<version>VERSION</version>
</dependency>
LombokExtensions provides a variety of utility classes to simplify your code. Here is a example of how you can use the library:
import lombok.experimental.ExtensionMethod;
import de.phoenixmitx.lombokextensions.ArrayExtension;
@ExtensionMethod({ ArrayExtension.class })
public class Example {
public static void main(String[] args) {
int[] array = new int[] {1, 2, 3, 4, 5};
long sum = array.sum();
System.out.println("Sum of array elements: " + sum);
}
}
If you're interested in contributing to LombokExtensions, we'd love to have your help!
LombokExtensions is licensed under the MIT License.