PresentationRefloker provides a fluent API do execute methods and read / write fields through reflection.
It tries to help to write expressive reflection invocations without cluttering your code with exception handling.
Refloker requires java 1.5 or more.
Refloker is still in alpha stage, API may be subject to change.
Usage crash courseSet a hidden field of an object
// the object which field we want to set
TargetClass target = ...
FieldSet fieldSet = Reflector.on(target).setHiddenField("fieldToSet").to(newValue));
Reflector.execute(fieldSet);You can achieve even more expressiveness with a static import :
import static fr.armida.refloker.Reflector.*;
...
execute(on(target).setHiddenField("fieldToSet").to(newValue));More information on how to use Refloker is (well, will be) available through Wiki pages marked as Usage or in the form of unit tests in the source repository
Maven repositoryYou can use Refloker in your maven project by adding the dependency :
armida
refloker
0.6
and the Refloker repository :
refloker-repo
Refloker m2 releases repository
http://refloker.googlecode.com/svn/m2-repo/release
30 Day Summary Apr 20 2013 — May 20 2013
|
12 Month Summary May 20 2012 — May 20 2013
|
Copyright
©
2013
Black Duck Software, Inc.
and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a
Creative Commons Attribution 3.0 Unported License
. Ohloh
®
and the Ohloh logo are trademarks of
Black Duck Software, Inc.
in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.