This is a demo project for new Java 8 Lambda features.
This demo is a support for the Lambda In Details serie of articles on my blog : http://doanduyhai.wordpress.com
!!! DISCLAIMER: all the test code in this project was written related to the JDK 8 demo version as of July 10th 2012. Since the JDK is still in beta, some assertions may not hold in future
- Download demo of JDK 8
- Install it somewhere on your disk
- Go into run/ and edit setJAVA_HOME.bat (or setJAVA_HOME.sh) and set it to the folder where you install the JDK 8
- Execute each of the script file depending on the scenario your want to test
Below is the demo scenarios and their corresponding executable:
Closure and Mutability: VariableCaptureInClosure & NonFinalVariableCaptureInClosure
Scoping of "this" and "effectively final" variable semantic: ScopingOfThis & LocalEffectivelyFinalVariable
Method and constructor referencing: MethodReference & ConstructorReference
Multiple inheritance resolution for defender methods: SameSuperDefenderMethod, MostSpecificDefender, ConflictingDefenders, PriorityToHierarchy, RemovedDefender, ResolvedDefenderConflictsAtInterface & ResolvedDefenderConflictsAtClass
[Functional interface definition and lambda expression implementation] (http://doanduyhai.wordpress.com/2012/07/17/java-8-lambda-in-details-part-v-functional-interface-definition-and-lambda-expression-implementation/): LambdaInstance