Top Description Fields Constructors Methods
org.glassfish.hk2.api

public Class DuplicateServiceException

extends HK2RuntimeException
Class Inheritance

This exception is thrown when an idempotent filter of a DynamicConfiguration object matches an existing descriptor in the ServiceLocator
Author
jwells

Field Summary

Modifier and TypeField and Description
private Descriptor
private static final long
private String

Constructor Summary

AccessConstructor and Description
public
DuplicateServiceException()

For serialization

public
DuplicateServiceException(Descriptor
The possibly null existing descriptor that matched one of the idempotent filters
existingDescriptor
)

Called by the system to initialize the existing descriptor that matched

public
DuplicateServiceException(Descriptor
The possibly null existing descriptor that matched one of the idempotent filters.
existingDescriptor
,
String
The name of the ServiceLocator that threw the exception.
serviceLocatorName
)

Called by the system to initialize the existing descriptor that matched

Method Summary

Modifier and TypeMethod and Description
public Descriptor

Returns:

The descriptor that matched one of the idempotent filters or null if the matching descriptor is unknown
getExistingDescriptor
()

Gets the descriptor that matched one of the idempotent filters

public String
toString()

Overrides java.lang.Throwable.toString.

Returns a short description of this throwable.

Field Detail

existingDescriptorback to summary
private Descriptor existingDescriptor
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.glassfish.hk2.api.HK2RuntimeException.serialVersionUID.

serviceLocatorNameback to summary
private String serviceLocatorName

Constructor Detail

DuplicateServiceExceptionback to summary
public DuplicateServiceException()

For serialization

DuplicateServiceExceptionback to summary
public DuplicateServiceException(Descriptor existingDescriptor)

Called by the system to initialize the existing descriptor that matched

Parameters
existingDescriptor:Descriptor

The possibly null existing descriptor that matched one of the idempotent filters

DuplicateServiceExceptionback to summary
public DuplicateServiceException(Descriptor existingDescriptor, String serviceLocatorName)

Called by the system to initialize the existing descriptor that matched

Parameters
existingDescriptor:Descriptor

The possibly null existing descriptor that matched one of the idempotent filters.

serviceLocatorName:String

The name of the ServiceLocator that threw the exception.

Method Detail

getExistingDescriptorback to summary
public Descriptor getExistingDescriptor()

Gets the descriptor that matched one of the idempotent filters

Returns:Descriptor

The descriptor that matched one of the idempotent filters or null if the matching descriptor is unknown

toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Doc from java.lang.Throwable.toString.

Returns a short description of this throwable. The result is the concatenation of:

  • the name of the class of this object
  • ": " (a colon and a space)
  • the result of invoking this object's getLocalizedMessage method
If getLocalizedMessage returns null, then just the class name is returned.
Annotations
@Override