1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[211534] Changed the constructor of the singleton class to private (try #2).

This commit is contained in:
Pawel Piech 2007-11-30 17:57:36 +00:00
parent 4e224fce0a
commit 84e4230f31

View file

@ -19,9 +19,19 @@ import java.util.concurrent.Executor;
* @see RequestMonitor * @see RequestMonitor
*/ */
public class ImmediateExecutor implements Executor { public class ImmediateExecutor implements Executor {
private static ImmediateExecutor fInstance = new ImmediateExecutor(); private static ImmediateExecutor fInstance = new ImmediateExecutor();
private static Executor getInstance() { /**
* The default constructor is hidden. {@link #getInstance()} should be
* used instead.
*/
private ImmediateExecutor() {}
/**
* Returns the singleton instance of ImmediateExecutor.
*/
public static Executor getInstance() {
return fInstance; return fInstance;
} }