org.eclipse.jst.jsf.context
Class AbstractDelegatingFactory

java.lang.Object
  extended by org.eclipse.jst.jsf.context.AbstractDelegatingFactory
All Implemented Interfaces:
IDelegatingFactory
Direct Known Subclasses:
AbstractStructuredDocumentContextFactory, StructuredDocumentSymbolResolverFactory

public abstract class AbstractDelegatingFactory
extends java.lang.Object
implements IDelegatingFactory

An abstract implementation of the IDelegatingFactory interface Clients may extend this class.


Method Summary
 void addFactoryDelegate(org.eclipse.core.runtime.IAdaptable delegate)
          Adds delgate to the end of the list of factory delegates if the list does not already contain it.
 java.util.List<java.lang.Class> getValidDelegateTypes()
           
 boolean isValidDelegate(org.eclipse.core.runtime.IAdaptable delegate)
          The return value of this method should conform to the following contract: Let v = getValidDelegates.
 boolean removeFactoryDelegate(org.eclipse.core.runtime.IAdaptable delegate)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addFactoryDelegate

public final void addFactoryDelegate(org.eclipse.core.runtime.IAdaptable delegate)
Description copied from interface: IDelegatingFactory
Adds delgate to the end of the list of factory delegates if the list does not already contain it.

Specified by:
addFactoryDelegate in interface IDelegatingFactory
See Also:
IDelegatingFactory.addFactoryDelegate(org.eclipse.core.runtime.IAdaptable)

removeFactoryDelegate

public final boolean removeFactoryDelegate(org.eclipse.core.runtime.IAdaptable delegate)
Specified by:
removeFactoryDelegate in interface IDelegatingFactory
Returns:
true if delegate was removed, false if delegate wasn't in the list of delegates
See Also:
IDelegatingFactory.removeFactoryDelegate(org.eclipse.core.runtime.IAdaptable)

getValidDelegateTypes

public final java.util.List<java.lang.Class> getValidDelegateTypes()
Specified by:
getValidDelegateTypes in interface IDelegatingFactory
Returns:
a list of Class objects that represent the interfaces that may be passed to addFactoryDelegate. Implementor should return at least one supported class.
See Also:
IDelegatingFactory.getValidDelegateTypes()

isValidDelegate

public final boolean isValidDelegate(org.eclipse.core.runtime.IAdaptable delegate)
Description copied from interface: IDelegatingFactory
The return value of this method should conform to the following contract: Let v = getValidDelegates. Then isValidDelegate should return true only if the set of v contains a Class for which delegate.getAdapter(Class) returns a non-null value.

Specified by:
isValidDelegate in interface IDelegatingFactory
Returns:
true if delegate is supported, false otherwise.
See Also:
IDelegatingFactory.isValidDelegate(org.eclipse.core.runtime.IAdaptable)