org.robotframework.javalib.factory
Class ApplicationContextKeywordFactory

java.lang.Object
  extended by org.robotframework.javalib.factory.ApplicationContextKeywordFactory
All Implemented Interfaces:
KeywordFactory<Keyword>

public class ApplicationContextKeywordFactory
extends java.lang.Object
implements KeywordFactory<Keyword>

Keyword factory that wraps an ApplicationContext. To be used with KeywordApplicationContext, otherwise keyword names will not be normalized.

See Also:
KeywordApplicationContext

Constructor Summary
ApplicationContextKeywordFactory(org.springframework.context.ApplicationContext ctx)
           
 
Method Summary
 Keyword createKeyword(java.lang.String keywordName)
          Creates an instance of the class implementing the given keyword name
 java.lang.ClassLoader getClassLoader()
          Returns the underlying ApplicationContext's class loader.
 java.lang.String[] getKeywordNames()
          Returns all the names of the keywords that this factory can create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationContextKeywordFactory

public ApplicationContextKeywordFactory(org.springframework.context.ApplicationContext ctx)
Parameters:
ctx - ApplicationContext to use. Preferably a KeywordApplicationContext.
Method Detail

createKeyword

public Keyword createKeyword(java.lang.String keywordName)
Description copied from interface: KeywordFactory
Creates an instance of the class implementing the given keyword name

Specified by:
createKeyword in interface KeywordFactory<Keyword>
Parameters:
keywordName - keyword name (will be normalized, so pretty much any formatting will do)
Returns:
keyword instance
See Also:
KeywordFactory.createKeyword(String)

getKeywordNames

public java.lang.String[] getKeywordNames()
Description copied from interface: KeywordFactory
Returns all the names of the keywords that this factory can create

Specified by:
getKeywordNames in interface KeywordFactory<Keyword>
Returns:
names of available keywords
See Also:
KeywordFactory.getKeywordNames()

getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns the underlying ApplicationContext's class loader.

Returns:
class loader


Copyright © 2009. All Rights Reserved.