Reading Materials
·
Google- Guice – Read the users guide
Exercise:
In the previous exercises we used Constructor Injection to pass the
algorithm implementation of choice.
Replace this method of DI with Google Guice’s @Inject annotation.
Everything should be defined in Guice’s AbstractModule (you
should inherit from it).
Update the automatic tests to work with the injection configuration
using Guice (it is possible to implement this using an inner class in the
tests).
The key creation method should be changed to the following method
(instead of a random key):
- Read the method names of all the methods in the
implementation class of the algorithm (e.g. DoubleEncryption) using
reflection API.
- Write a hash function that transforms the list of
strings (method names) to the key.
No comments:
Post a Comment