Age | Commit message (Collapse) | Author |
|
This is an initial draft for how an @Memoize annotation could look like.
It currently lacks features such as:
- Thread safety
- Cache invalidation
- Soft/Weak References for a lower memory profile
- Avoiding using a Map entirely for parameterless methods
Ideally at least some of these properties should be configurable using
flags and/or annotation properties (some users might prefer a non
thread safe cache for better performance).
Example Usage:
```java
class Test {
int invocationCount = 0;
public static void main(String[] args) {
Test test = new Test();
System.out.println(test.x(1, 2));
System.out.println(test.x(1, 2));
System.out.println(test.x(1, 3));
System.out.println("Invocation Count: " + test.invocationCount);
}
@lombok.experimental.Memoize
public int x(int y, int z) {
invocationCount++;
return y + z;
}
}
```
|
|
|
|
|
|
|
|
|
|
|
|
Reduce allocations from JavacHandlerUtil.typeMatches()
|
|
Remove obsolete LombokProcessor.getModuleName
|
|
|
|
|
|
|
|
|
|
Reset erasure_field of symbol
|
|
Convert short array initializers to long version
|
|
Ignore non-static/non-public extension methods
|
|
Use real type for enclosing class
|
|
fixes #3259: allow @ExtensionMethod on interfaces
|
|
Fix typos
|
|
Fix SuperBuilder for fields named "build" or "self"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self/build methods
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
What's the name of one of those bugs where you look at it and go: Wow. This can never have possibly worked?
And yet it has? An inverse heisenbug: Once observed, it has always existed, but before observing it, no problems.
Anyway, fixed. For what it's worth.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
placed inside an enum or interface.
|
|
|
|
|
|
Keep record compact constructor parameters
|
|
Clone primitive types
|
|
Handle anonymous classes properly
|
|
|
|
|
|
|
|
|