org.specrunner.source.core
Class SourceFactoryManagerImpl

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,T>
          extended by org.specrunner.util.mapping.core.MappingManagerImpl<ISourceFactory>
              extended by org.specrunner.source.core.SourceFactoryManagerImpl
All Implemented Interfaces:
Serializable, Cloneable, Map<String,ISourceFactory>, ISourceFactoryManager, IMappingManager<ISourceFactory>

public class SourceFactoryManagerImpl
extends MappingManagerImpl<ISourceFactory>
implements ISourceFactoryManager

Default implementation for a source manager. Get the source factory based on file extension type.

Author:
Thiago Santos
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.specrunner.util.mapping.core.MappingManagerImpl
initialized
 
Fields inherited from interface org.specrunner.util.mapping.IMappingManager
DEFAULT_NAME
 
Constructor Summary
SourceFactoryManagerImpl()
          Default constructor.
 
Method Summary
 Set<String> keySet()
           
 ISource newSource(Object source)
          Get an instance of a source factory compatible with the given source.
 
Methods inherited from class org.specrunner.util.mapping.core.MappingManagerImpl
bind, get, getDefault, initialize, normalizeKey, setDefault
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.specrunner.util.mapping.IMappingManager
bind, getDefault, setDefault
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, put, putAll, remove, size, values
 

Constructor Detail

SourceFactoryManagerImpl

public SourceFactoryManagerImpl()
Default constructor.

Method Detail

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,ISourceFactory>
Overrides:
keySet in class MappingManagerImpl<ISourceFactory>

newSource

public ISource newSource(Object source)
                  throws SourceException
Description copied from interface: ISourceFactoryManager
Get an instance of a source factory compatible with the given source.

Specified by:
newSource in interface ISourceFactoryManager
Parameters:
source - The specification source object.
Returns:
A source factory.
Throws:
SourceException - If a reader for source cannot be found.


Copyright © 2014. All rights reserved.