Archive

Posts Tagged ‘Refactoring’

Into the Void: Refining Java beans with rare weapons

July 17, 2011 2 comments

Lately I’ve been experimenting with the Void class, because I asked myself what I could do with it that I haven’t yet thought about. I came across a use case that I’d like to share with you, because I think it is possible to beautify one’s code with it. In the process of slightly refactoring a Java bean in order to get a nicer, more refactoring-proof way of dealing with beans and reflection, I’m also using an inline-assignment in a way that you might already have come across, still I have hardly seen it anywhere in the wild, even though I find this particular use case for inline-assignments one of the best there is.
Read more…

Advertisements

Reflection without Strings

August 9, 2010 4 comments

Sometimes reflection is very handy, but using reflection often involves referencing methods by Strings, which can get you into major trouble when you are refactoring your code. If a method belongs to an interface though, there is salvation. But let me first tell you how it started and what I did about it. Read more…