Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/locator/AbstractLocatorProvider.java')
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/locator/AbstractLocatorProvider.java72
1 files changed, 0 insertions, 72 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/locator/AbstractLocatorProvider.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/locator/AbstractLocatorProvider.java
deleted file mode 100644
index edd77dc23..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/locator/AbstractLocatorProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.jst.jsf.common.internal.locator;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * The super-class of all ILocatorProvider's.
- *
- * @author cbateman
- * @param <LOCATORTYPE>
- *
- */
-public abstract class AbstractLocatorProvider<LOCATORTYPE> implements ILocatorProvider<LOCATORTYPE>
-{
- private boolean _isInit = false;
-
- public void initialize()
- {
- doInitialize();
- _isInit = true;
- }
-
- /**
- * Overrride to do the init. You can override initialize if you want to
- */
- protected abstract void doInitialize();
-
- public List<? extends LOCATORTYPE> getLocators()
- {
- if (!_isInit)
- {
- throw new IllegalStateException(
- "initialize must be called before getLocators"); //$NON-NLS-1$
- }
- return doGetLocators();
- }
-
- /**
- * @return the locators.
- */
- protected abstract List<? extends LOCATORTYPE> doGetLocators();
-
- /**
- * A default implementation of the provider that simply sits on a list
- * of a locators.
- *
- * @param <LOCATORTYPE>
- */
- public static class DefaultLocatorProvider<LOCATORTYPE> extends AbstractLocatorProvider<LOCATORTYPE>
- {
- private final List<LOCATORTYPE> _locators;
-
- /**
- * @param locators
- */
- public DefaultLocatorProvider(List<LOCATORTYPE> locators)
- {
- _locators = locators;
- }
- @Override
- protected void doInitialize()
- {
- // nothing to do.
- }
-
- @Override
- protected List<? extends LOCATORTYPE> doGetLocators()
- {
- return Collections.unmodifiableList(_locators);
- }
- }
-}

Back to the top