org.jboss.arquillian.impl
Class XmlConfigurationBuilder

java.lang.Object
  extended by org.jboss.arquillian.impl.XmlConfigurationBuilder
All Implemented Interfaces:
ConfigurationBuilder

public class XmlConfigurationBuilder
extends Object
implements ConfigurationBuilder

An implementation of ConfigurationBuilder that loads the configuration from the arquillian.xml file located in the root of the classpath. If not found, it just returns an empty Configuration object.

Version:
$Revision: $
Author:
German Escobar, Aslak Knutsen

Constructor Summary
XmlConfigurationBuilder()
          Constructor.
XmlConfigurationBuilder(String resourcePath)
          Constructor.
XmlConfigurationBuilder(String resourcePath, ServiceLoader serviceLoader)
          Constructor.
 
Method Summary
 Configuration build()
          Builds the Configuration object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlConfigurationBuilder

public XmlConfigurationBuilder()
Constructor. Initializes with the default resource path and service loader.


XmlConfigurationBuilder

public XmlConfigurationBuilder(String resourcePath)
Constructor. Initializes with the provided resource path and the default service loader.

Parameters:
resourcePath - the path to the XML configuration file.

XmlConfigurationBuilder

public XmlConfigurationBuilder(String resourcePath,
                               ServiceLoader serviceLoader)
Constructor. Initializes with the provided resource path and service loader.

Parameters:
resourcePath - the path to the XML configuration file.
serviceLoader - the ServiceLoader implementation to use.
Method Detail

build

public Configuration build()
                    throws ConfigurationException
Description copied from interface: ConfigurationBuilder
Builds the Configuration object.

Specified by:
build in interface ConfigurationBuilder
Returns:
a not-null Configuration object.
Throws:
ConfigurationException - if there is a problem building the configuration object


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.