Skip to main content
Filter by
Sorted by
Tagged with
-8 votes
1 answer
112 views

When trying to performance-tune our XML parsing/validation/binding pipeline, I frequently hit the wall because java.lang.String neither exposes its internal backing array byte[] value / byte coder nor ...
winne2's user avatar
  • 2,232
0 votes
1 answer
149 views

@Benchmark public void testLambdaGeneration(Blackhole bh) { Function<Object, Object> function = a -> { if(a instanceof Alpha alpha) { return alpha.primitiveInt(); ...
benrush's user avatar
  • 373
3 votes
2 answers
635 views

I want to convert a Record's constructor to a Function<Object[], T> using lambdametafactory (T is a generic type), here are my codes: public record R( String a, String b ) { } ...
benrush's user avatar
  • 373
3 votes
1 answer
305 views

I have a few classes that each implement an interface. From these classes I search out a method using an annotation. This method returns a boolean and always has an object as parameter, which always ...
zuzuri's user avatar
  • 45
0 votes
1 answer
137 views

For example, when I execute the following: public static int addOne(Number base) { return base.intValue() + 1; } public static interface AddOneLambda { public int addOne(Integer base); } public ...
Numeron's user avatar
  • 8,841
2 votes
1 answer
758 views

I would like to use LambdaMetaFactory to efficiently access a private method. public class Foo { private void bar() { // here's what I want to invoke System.out.println("bar!"); } } ...
Dragon's user avatar
  • 303
0 votes
1 answer
276 views

I'm trying to transform a Method (read from a file) into a lambda expression, so I can measure the time needed to execute that Method ignoring the slow Method.invoke(...) function. I've been trying to ...
Ángel Díaz de Vivar's user avatar
0 votes
0 answers
265 views

I'm using LambdaMetaFactory to expose getters. I have a POJO with many fields and I don't know which fields are going to be populated. I'm trying to avoid both an extended if statement and also ...
die Wolken's user avatar
  • 1,924
3 votes
1 answer
781 views

I'm trying to dynamically create a method reference of type BiConsumer through LambdaMetafactory. I was trying to apply two approaches found on https://www.cuba-platform.com/blog/think-twice-before-...
Kristoff's user avatar
  • 344
3 votes
1 answer
522 views

How can I create proxy objects for SAM/functional interfaces using LambdaMetaFactory ie. equivalent of public static Object java.lang.reflect.Proxy.newProxyInstance(ClassLoader, Class<?>[], ...
S M's user avatar
  • 81
1 vote
1 answer
783 views

I’m trying to create a small utility to replace my use of reflection across my entire project (mostly for performance benefits of using LambdaMetafactory) but I’m stumbling at the creation of a ...
justis's user avatar
  • 631
2 votes
2 answers
807 views

I have an interface Action: package action; public interface Action { public String act(); } Class SimpleAction: package action; public class SimpleAction implements Action { String action;...
John Doe's user avatar
  • 167
7 votes
2 answers
2k views

I am trying to use Java's LambdaMetaFactory to dynamically implement a generic lambda, Handler<RoutingContext>: public class RoutingContext { // ... } @FunctionalInterface public interface ...
Luke Hutchison's user avatar
0 votes
1 answer
929 views

I am currently using Java reflection I don't have any problem doing it with reflection . I learned about LambdaMetaFactory has better performance than reflection .. There is examples about getter ...
Saltuk's user avatar
  • 1,159