org.hibernate.beanvalidation.tck.util.shrinkwrap
Class ArchiveBuilder<T extends ArchiveBuilder<T,A>,A extends org.jboss.shrinkwrap.api.Archive<A>>
java.lang.Object
org.hibernate.beanvalidation.tck.util.shrinkwrap.ArchiveBuilder<T,A>
- Type Parameters:
T - Self type to enable abstract builder patternA - Final shrinkwrap archive
- Direct Known Subclasses:
- WebArchiveBuilder
public abstract class ArchiveBuilder<T extends ArchiveBuilder<T,A>,A extends org.jboss.shrinkwrap.api.Archive<A>>
- extends Object
Abstract ShrinkWrap archive builder for Bean Validation TCK Arquillian test.
This is a base class for builders that try to solve most JBoss Test Harness to Arquillian migration issues. The
main goal was to use Bean Validation TCK 1.0 tests with minimum code changes.
- Author:
- Martin Kouba, Hardy Ferentschik
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resources
protected List<ArchiveBuilder.ResourceDescriptor> resources
packages
protected List<String> packages
classes
protected List<String> classes
serviceProviders
protected List<ArchiveBuilder.ServiceProviderDescriptor> serviceProviders
ArchiveBuilder
public ArchiveBuilder()
withName
public T withName(String name)
withServiceProvider
public T withServiceProvider(ArchiveBuilder.ServiceProviderDescriptor serviceProvider)
withClass
public T withClass(Class<?> clazz)
withClasses
public T withClasses(Class<?>... classes)
withTestClassPackage
public T withTestClassPackage(Class<?> testClazz)
- Add all classes in the test class package to archive and set test class definition for configuration purpose.
- Parameters:
testClazz - the test class
- Returns:
- self
withTestClass
public T withTestClass(Class<?> testClazz)
- Add test class to archive and set test class definition for configuration purpose.
- Parameters:
testClazz - the test class
- Returns:
- self
withTestClassDefinition
public T withTestClassDefinition(Class<?> testClazz)
withPackage
public T withPackage(Package pack)
withResource
public T withResource(String source)
withResource
public T withResource(String source,
boolean useTestPackageToLocateSource)
withResource
public T withResource(String source,
String target,
boolean useTestPackageToLocateSource)
withValidationXml
public T withValidationXml(String source)
withEmptyBeansXml
public abstract T withEmptyBeansXml()
self
public abstract T self()
- Returns:
- self to enable generic builder
build
public A build()
- Returns:
- shrinkwrap archive
buildInternal
protected abstract A buildInternal()
- Returns:
- concrete shrinkwrap archive
processPackages
protected void processPackages(org.jboss.shrinkwrap.api.container.ClassContainer<?> archive)
processClasses
protected void processClasses(org.jboss.shrinkwrap.api.container.ClassContainer<?> archive)
processResources
protected void processResources(org.jboss.shrinkwrap.api.container.ResourceContainer<?> archive)
getName
public String getName()
- Returns:
- name of final archive
Copyright © 2008-2013. All Rights Reserved.