T - Self type to enable abstract builder patternA - Final shrinkwrap archivepublic abstract class ArchiveBuilder<T extends ArchiveBuilder<T,A>,A extends org.jboss.shrinkwrap.api.Archive<A>> extends Object
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.
| Modifier and Type | Class and Description |
|---|---|
protected class |
ArchiveBuilder.ResourceDescriptor
Internal resource descriptor.
|
protected class |
ArchiveBuilder.ServiceProviderDescriptor
Internal service provider descriptor.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<File> |
additionalJars |
protected List<String> |
classes |
protected List<String> |
packages |
protected List<ArchiveBuilder.ResourceDescriptor> |
resources |
protected List<ArchiveBuilder.ServiceProviderDescriptor> |
serviceProviders |
| Constructor and Description |
|---|
ArchiveBuilder() |
| Modifier and Type | Method and Description |
|---|---|
A |
build() |
protected abstract A |
buildInternal() |
String |
getName() |
protected void |
processAdditionalJars(org.jboss.shrinkwrap.api.container.LibraryContainer<?> archive) |
protected void |
processClasses(org.jboss.shrinkwrap.api.container.ClassContainer<?> archive) |
protected void |
processPackages(org.jboss.shrinkwrap.api.container.ClassContainer<?> archive) |
protected void |
processResources(org.jboss.shrinkwrap.api.container.ResourceContainer<?> archive) |
abstract T |
self() |
T |
withAdditionalJar(String jarPath) |
T |
withClass(Class<?> clazz) |
T |
withClasses(Class<?>... classes) |
abstract T |
withEmptyBeansXml() |
T |
withName(String name) |
T |
withPackage(Package pack) |
T |
withResource(String source) |
T |
withResource(String source,
boolean useTestPackageToLocateSource) |
T |
withResource(String source,
String target,
boolean useTestPackageToLocateSource) |
T |
withServiceProvider(ArchiveBuilder.ServiceProviderDescriptor serviceProvider) |
T |
withTestClass(Class<?> testClazz)
Add test class to archive and set test class definition for configuration purpose.
|
T |
withTestClassDefinition(Class<?> testClazz) |
T |
withTestClassPackage(Class<?> testClazz)
Add all classes in the test class package to archive and set test class definition for configuration purpose.
|
T |
withValidationXml(String source) |
protected List<ArchiveBuilder.ResourceDescriptor> resources
protected List<ArchiveBuilder.ServiceProviderDescriptor> serviceProviders
public T withServiceProvider(ArchiveBuilder.ServiceProviderDescriptor serviceProvider)
public T withTestClassPackage(Class<?> testClazz)
testClazz - the test classpublic T withTestClass(Class<?> testClazz)
testClazz - the test classpublic T withResource(String source, String target, boolean useTestPackageToLocateSource)
public abstract T withEmptyBeansXml()
public abstract T self()
public A build()
protected abstract A buildInternal()
protected void processPackages(org.jboss.shrinkwrap.api.container.ClassContainer<?> archive)
protected void processClasses(org.jboss.shrinkwrap.api.container.ClassContainer<?> archive)
protected void processResources(org.jboss.shrinkwrap.api.container.ResourceContainer<?> archive)
protected void processAdditionalJars(org.jboss.shrinkwrap.api.container.LibraryContainer<?> archive)
public String getName()
Copyright © 2008–2017. All rights reserved.