|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.hk2.utilities.BuilderHelper
public class BuilderHelper
This class is used to generate DescriptorBuilders to be used as a simple mechanism to create a Filter or Descriptor.
| Constructor Summary | |
|---|---|
BuilderHelper()
|
|
| Method Summary | ||
|---|---|---|
static Filter |
allFilter()
Returns a filter of type Descriptor that matches all descriptors |
|
static
|
createConstantDescriptor(T constant)
This creates a descriptor that will always return the given object. |
|
static IndexedFilter |
createContractFilter(String contract)
Returns an indexed filter that will return all descriptors that have contract as an advertised contract |
|
static DescriptorImpl |
createDescriptorFromClass(Class<?> clazz)
This returns a DescriptorImpl based on the given class. |
|
static IndexedFilter |
createNameAndContractFilter(String contract,
String name)
Returns an indexed filter that will return all descriptors that have the given name and given contract |
|
static IndexedFilter |
createNameFilter(String name)
Returns an indexed filter that will return all descriptors that have the given name |
|
static Descriptor |
deepCopyDescriptor(Descriptor copyMe)
Makes a deep copy of the incoming descriptor |
|
static DescriptorBuilder |
link(Class<?> implementationClass)
This method links an implementation class with a DescriptorBuilder, to
be used to further build the Descriptor. |
|
static DescriptorBuilder |
link(Class<?> implementationClass,
boolean addToContracts)
This method links an implementation class with a DescriptorBuilder, to
be used to further build the Descriptor |
|
static DescriptorBuilder |
link(String implementationClass)
This method links an implementation class with a DescriptorBuilder, to
be used to further build the Descriptor. |
|
static DescriptorBuilder |
link(String implementationClass,
boolean addToContracts)
This method links an implementation class with a DescriptorBuilder, to
be used to further build the Descriptor. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BuilderHelper()
| Method Detail |
|---|
public static IndexedFilter createContractFilter(String contract)
contract - The advertised contract to look for
public static IndexedFilter createNameFilter(String name)
name - The name to look for
public static IndexedFilter createNameAndContractFilter(String contract,
String name)
contract - The advertised contract to look forname - The name to look for
public static Filter allFilter()
public static DescriptorBuilder link(String implementationClass,
boolean addToContracts)
throws IllegalArgumentException
DescriptorBuilder, to
be used to further build the Descriptor.
implementationClass - The fully qualified name of the implementation
class to be associated with the DescriptorBuilder.addToContracts - if true, this implementation class will be added to the
list of contracts
DescriptorBuilder that can be used to further build up the
Descriptor
IllegalArgumentException - if implementationClass is null
public static DescriptorBuilder link(String implementationClass)
throws IllegalArgumentException
DescriptorBuilder, to
be used to further build the Descriptor. This method will automatically
put the implementationClass into the list of advertised contracts.
implementationClass - The fully qualified name of the implementation
class to be associated with the PredicateBuilder.
DescriptorBuilder that can be used to further build up the
Descriptor
IllegalArgumentException - if implementationClass is null
public static DescriptorBuilder link(Class<?> implementationClass,
boolean addToContracts)
throws IllegalArgumentException
DescriptorBuilder, to
be used to further build the Descriptor
implementationClass - The implementation class to be associated
with the DescriptorBuilder.addToContracts - true if this impl class should be automatically added to
the list of contracts
DescriptorBuilder that can be used to further build up the
Descriptor
IllegalArgumentException - if implementationClass is null
public static DescriptorBuilder link(Class<?> implementationClass)
throws IllegalArgumentException
DescriptorBuilder, to
be used to further build the Descriptor.
implementationClass - The implementation class to be associated
with the DescriptorBuilder.
DescriptorBuilder that can be used to further build up the
Descriptor
IllegalArgumentException - if implementationClass is nullpublic static <T> AbstractActiveDescriptor<T> createConstantDescriptor(T constant)
constant - The non-null constant that should always be returned from
the create method of this ActiveDescriptor.
public static DescriptorImpl createDescriptorFromClass(Class<?> clazz)
clazz - The class to analyze
public static Descriptor deepCopyDescriptor(Descriptor copyMe)
copyMe - The descriptor to copy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||