sexta-feira, 20 de fevereiro de 2009

I am back for some finger pointing

Hello all!!!

It was a long time since my last post, I know it. But I am back, and this time for some finger pointing.
Yes that it! No technical stuff here, just fun.

Why are you doing it? (a fair question): I have just jumped in a new project and currenctly I am looking the code around me.
Take a look at this pearl: a class called SwissArmyKnife. What would you expect from it? A class with a lot of util method that makes things that even McGuyver could never imagine, yes that is true... but the reality is a little bit different.

Take a look:

public class SwissArmyKnife {
public static String getSimpleClassName( String strClazzName ){
String strSimpleClassName = "";
StringTokenizer st = new StringTokenizer(strClazzName, ".");
while(st.hasMoreTokens()){
strSimpleClassName = st.nextToken();
}
return strSimpleClassName;
}
}