forked from JavaTX/JavaCompilerCore
modified: ../../test/bytecode/LambdaTest.java
Lambda-Ausruck wird ausgewertet. Funktioniert nicht, vermutich, weil Lambda-Methode apply private
This commit is contained in:
parent
c3ca4777bb
commit
fe99db81b3
@ -33,11 +33,10 @@ public class LambdaTest {
|
||||
instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
|
||||
|
||||
Method m = classToTest.getDeclaredMethod("m");
|
||||
//Class<?>
|
||||
Object lambda = (m.invoke(instanceOfClass)); //.getClass();
|
||||
//Method apply = lambda.getMethod("apply", Integer.class);
|
||||
//Integer result = (Integer) apply.invoke(lambda, 77);
|
||||
//assertEquals(77, result);
|
||||
Class<?> lambda = m.invoke(instanceOfClass).getClass();
|
||||
Method apply = lambda.getMethod("apply", Object.class);
|
||||
Integer result = (Integer) apply.invoke(lambda, new Integer(77)); //laeuft nicht, vermutlich weil Lambda-Ausdruck private
|
||||
assertEquals(77, result);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user