2.0.0
Changes in this release:
- In this release, the prompt queries were changed internally and some refactoring was done.
@Entrypoint(verbose = false, stopwatch = false)
is now the default behaviour.
Array Wrappers
Arrays can now be used as parameters.
The separator can be changed by the @Split
-annotation. By default, comma is used.
Note: The individual values cannot yet be checked in this release (e.g. by Range).
@Entrypoint
public void run(
@Split(",") final int[] numbers
) {
System.out.println(Arrays.toString(numbers));
}
// [arr<int>] arg0: 0,1,2,3
// [0, 1, 2, 3]
@Transform
and @Range
can be used on arrays:
@Entrypoint
public void run(
@Split(",") @Range({2, 3}) @Transform(Type.UPPER)
final String[] names
) {
System.out.println(Arrays.toString(names));
}
// [arr<String>] /,/ arg0: simon // @Range not satisfied
// [arr<String>] /,/ arg0: simon,thorsten
// [SIMON, THORSTEN]
@Pattern
The @Pattern
annotation was implemented, which can be used to check strings for a RegEx-pattern:
@Entrypoint
public void run(
@Pattern("^[A-Ha-h]{6}$") final String input
) {
System.out.println(input);
}
// input "AbCdEfG" allowed
// input "AAAA" not allowed
// input "AbDgHi" not allowed
loop
Entrypoint
The @Entrypoint
annotation now includes a loop
-attribute. If this is set to true
, the method is executed in a permanent loop.
@Entrypoint(loop = true)
public void run(
@Pattern("^[A-Ha-h]{6}$") final String input
) {
System.out.println(input);
}
// arg0: AAAAAA
// AAAAAA
// arg0: BBBBBB
// BBBBBB
Contributors
- @darmiel
- @Luca-Hackl #3 (new contributor! 🎉)
Installation
Maven
- Add this repository to your
pom.xml
:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
- Add the
eeee
-dependency:
<dependency>
<groupId>com.github.darmiel</groupId>
<artifactId>eeee</artifactId>
<version>2.0.0</version>
</dependency>