org.robotframework.javalib.library
Class AnnotationLibrary

java.lang.Object
  extended by org.robotframework.javalib.library.KeywordFactoryBasedLibrary<DocumentedKeyword>
      extended by org.robotframework.javalib.library.AnnotationLibrary
All Implemented Interfaces:
KeywordDocumentationRepository, RobotJavaLibrary

public class AnnotationLibrary
extends KeywordFactoryBasedLibrary<DocumentedKeyword>
implements KeywordDocumentationRepository

Author:
Heikki Hulkko

Constructor Summary
AnnotationLibrary()
           
AnnotationLibrary(java.lang.String keywordPattern)
           
 
Method Summary
protected  KeywordFactory<DocumentedKeyword> createKeywordFactory()
          Creates a keyword factory.
 java.lang.String[] getKeywordArguments(java.lang.String keywordName)
           
 java.lang.String getKeywordDocumentation(java.lang.String keywordName)
           
 java.lang.Object runKeyword(java.lang.String keywordName, java.lang.Object[] args)
          Runs a keyword and returns the result.
 void setKeywordPattern(java.lang.String keywordPattern)
           
 
Methods inherited from class org.robotframework.javalib.library.KeywordFactoryBasedLibrary
getClassLoader, getKeywordNames, setClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationLibrary

public AnnotationLibrary()

AnnotationLibrary

public AnnotationLibrary(java.lang.String keywordPattern)
Method Detail

createKeywordFactory

protected KeywordFactory<DocumentedKeyword> createKeywordFactory()
Description copied from class: KeywordFactoryBasedLibrary
Creates a keyword factory. Must be implemented by subclasses. The keyword factory is created lazily, when either KeywordFactoryBasedLibrary.getKeywordNames() or KeywordFactoryBasedLibrary.runKeyword(String, Object[]) is called for the first time.

Specified by:
createKeywordFactory in class KeywordFactoryBasedLibrary<DocumentedKeyword>
Returns:
keyword factory

getKeywordArguments

public java.lang.String[] getKeywordArguments(java.lang.String keywordName)
Specified by:
getKeywordArguments in interface KeywordDocumentationRepository

getKeywordDocumentation

public java.lang.String getKeywordDocumentation(java.lang.String keywordName)
Specified by:
getKeywordDocumentation in interface KeywordDocumentationRepository

runKeyword

public java.lang.Object runKeyword(java.lang.String keywordName,
                                   java.lang.Object[] args)
Description copied from interface: RobotJavaLibrary
Runs a keyword and returns the result. If an exception is thrown the keyword fails, otherwise it passes.

Specified by:
runKeyword in interface RobotJavaLibrary
Overrides:
runKeyword in class KeywordFactoryBasedLibrary<DocumentedKeyword>
Parameters:
keywordName - keyword name to run
args - arguments for the keyword
Returns:
keyword return value
See Also:
RobotJavaLibrary.runKeyword(String, Object[])

setKeywordPattern

public void setKeywordPattern(java.lang.String keywordPattern)


Copyright © 2008. All Rights Reserved.