org.jbehave.core.configuration
Class AnnotationBuilder

java.lang.Object
  extended by org.jbehave.core.configuration.AnnotationBuilder

public class AnnotationBuilder
extends Object

Allows the building of Configuration, CandidateSteps and Embedder from an annotated class.

Author:
Cristiano Gavião, Mauro Talevi

Nested Class Summary
static class AnnotationBuilder.InstantiationFailed
           
 
Constructor Summary
AnnotationBuilder(Class<?> annotatedClass)
           
AnnotationBuilder(Class<?> annotatedClass, AnnotationMonitor annotationMonitor)
           
 
Method Summary
 Class<?> annotatedClass()
           
protected  AnnotationFinder annotationFinder()
           
protected  AnnotationMonitor annotationMonitor()
           
 List<CandidateSteps> buildCandidateSteps()
          Builds CandidateSteps using annotation UsingSteps found in the annotated object instance and using the configuration build by buildConfiguration()
 List<CandidateSteps> buildCandidateSteps(Configuration configuration)
          Builds CandidateSteps using annotation UsingSteps found in the annotated object instance and the configuration provided
 Configuration buildConfiguration()
          Builds a Configuration instance based on annotation Configure found in the annotated object instance
 Embedder buildEmbedder()
           
 Object embeddableInstance()
           
 List<String> findPaths()
           
protected  Object injectEmbedder(Embedder embedder, Class<?> annotatedClass)
           
protected
<T,V extends T>
T
instanceOf(Class<T> type, Class<V> ofClass)
           
protected  ParameterConverters parameterConverters(AnnotationFinder annotationFinder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationBuilder

public AnnotationBuilder(Class<?> annotatedClass)

AnnotationBuilder

public AnnotationBuilder(Class<?> annotatedClass,
                         AnnotationMonitor annotationMonitor)
Method Detail

annotatedClass

public Class<?> annotatedClass()

buildConfiguration

public Configuration buildConfiguration()
                                 throws AnnotationRequired
Builds a Configuration instance based on annotation Configure found in the annotated object instance

Returns:
A Configuration instance
Throws:
AnnotationRequired

buildCandidateSteps

public List<CandidateSteps> buildCandidateSteps()
Builds CandidateSteps using annotation UsingSteps found in the annotated object instance and using the configuration build by buildConfiguration()

Returns:
A List of CandidateSteps instances

buildCandidateSteps

public List<CandidateSteps> buildCandidateSteps(Configuration configuration)
Builds CandidateSteps using annotation UsingSteps found in the annotated object instance and the configuration provided

Parameters:
configuration - the Configuration
Returns:
A List of CandidateSteps instances

buildEmbedder

public Embedder buildEmbedder()

findPaths

public List<String> findPaths()

parameterConverters

protected ParameterConverters parameterConverters(AnnotationFinder annotationFinder)

instanceOf

protected <T,V extends T> T instanceOf(Class<T> type,
                                       Class<V> ofClass)

annotationMonitor

protected AnnotationMonitor annotationMonitor()

annotationFinder

protected AnnotationFinder annotationFinder()

embeddableInstance

public Object embeddableInstance()

injectEmbedder

protected Object injectEmbedder(Embedder embedder,
                                Class<?> annotatedClass)


Copyright © 2003-2011. All Rights Reserved.