Do you want to create a singleton template?
public Class A extends CCcolorlayer
{
private static final A INSTANCE= new A();
A()
{
}
public static A getInstance()
{ return INSTANCE;
}
}
From class B
public class B
{
B()
{
A.getInstance();
}
}
I'm not sure what you are looking for.
source
share