org.jboss.shrinkwrap.descriptor.api
Class Descriptors

java.lang.Object
  extended by org.jboss.shrinkwrap.descriptor.api.Descriptors

public final class Descriptors
extends Object

Main entry point into the ShrinkWrap Descriptors project.

Author:
Dan Allen, Aslak Knutsen, ALR

Method Summary
static
<T extends Descriptor>
T
create(Class<T> type)
          Creates a new Descriptor instance; the predefined default descriptor name for this type will be used.
static
<T extends Descriptor>
T
create(Class<T> type, String descriptorName)
          Creates a new named Descriptor instance.
static
<T extends Descriptor>
DescriptorImporter<T>
importAs(Class<T> type)
          Returns a new DescriptorImporter instance, ready to import as a new Descriptor instance of the given type
static
<T extends Descriptor>
DescriptorImporter<T>
importAs(Class<T> type, String descriptorName)
          Returns a new named DescriptorImporter instance, ready to import as a new Descriptor instance of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static <T extends Descriptor> T create(Class<T> type)
                                   throws IllegalArgumentException
Creates a new Descriptor instance; the predefined default descriptor name for this type will be used.

Type Parameters:
T -
Parameters:
type -
Returns:
Throws:
IllegalArgumentException - If the type is not specified
See Also:
create(Class, String)

create

public static <T extends Descriptor> T create(Class<T> type,
                                              String descriptorName)
                                   throws IllegalArgumentException
Creates a new named Descriptor instance. If the name specified is null, the default name for this type will be assigned.

Type Parameters:
T -
Parameters:
type -
descriptorName - the descriptor name
Returns:
Throws:
IllegalArgumentException - If the type is not specified

importAs

public static <T extends Descriptor> DescriptorImporter<T> importAs(Class<T> type)
                                                         throws IllegalArgumentException
Returns a new DescriptorImporter instance, ready to import as a new Descriptor instance of the given type

Parameters:
type -
Returns:
Throws:
IllegalArgumentException - If the type is not specified

importAs

public static <T extends Descriptor> DescriptorImporter<T> importAs(Class<T> type,
                                                                    String descriptorName)
                                                         throws IllegalArgumentException
Returns a new named DescriptorImporter instance, ready to import as a new Descriptor instance of the given type. If the name specified is null, the default name for this type will be assigned.

Parameters:
type -
descriptorName -
Returns:
Throws:
IllegalArgumentException - If the type is not specified


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