J
Jason Cavett
I have a class with a static member (an array). The array is NOT
being initialized before I use it unless I specifically instantiate an
instance of the class within itself (see below). Is there a way to
make sure the static member is initialized without having to do this
(and NOT use a Singleton w/ lazy instantiation)?
Thanks
Example:
public class ActionManager {
// ... other stuff ...
private static ResourceManager<String, AbstractAction> manager = new
ResourceManager<String, AbstractAction>();
// XXX - There might be a better way to do this...
@SuppressWarnings("unused")
private static ActionManager actionManager = new ActionManager();
// ... other stuff ...
}
being initialized before I use it unless I specifically instantiate an
instance of the class within itself (see below). Is there a way to
make sure the static member is initialized without having to do this
(and NOT use a Singleton w/ lazy instantiation)?
Thanks
Example:
public class ActionManager {
// ... other stuff ...
private static ResourceManager<String, AbstractAction> manager = new
ResourceManager<String, AbstractAction>();
// XXX - There might be a better way to do this...
@SuppressWarnings("unused")
private static ActionManager actionManager = new ActionManager();
// ... other stuff ...
}