You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tomasz Pik <pi...@ais.pl> on 2002/08/19 06:35:55 UTC
XxxUtils constructors
(maybe this idea has been discussed yes, if yes, I'm sorry for
this email).
Why the XxxUtils classes cannot use singleton pattern, something like:
public class XUtils {
private static XUtils _singleton = new XUtils();
private XUtils() {
;
}
public static XUtils singleton() {
return _singleton;
}
public static boolean doUtilityFunction() {
return true;
}
}
They'll have private constructors but people may use them inside
Velocity (as context.put("XUtils", XUtils.singleton();).
Regards
Tomek Pik
pikus@ais.pl
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>