@groovy.transform.Internal class DefaultServiceDefinition<S> extends java.lang.Object implements ServiceDefinition
Default implementation of ServiceDefinition.
S
- The typeModifiers | Name | Description |
---|---|---|
private java.util.Optional<java.lang.Class<S>> |
loadedClass |
|
private java.lang.String |
name |
Constructor and description |
---|
DefaultServiceDefinition
(java.lang.String name, java.util.Optional<java.lang.Class<S>> loadedClass)
|
Type Params | Return Type | Name and description |
---|---|---|
|
public java.lang.String |
getName() |
|
public java.lang.Class<S> |
getType() |
|
public boolean |
isPresent() |
|
public S |
load() |
<X extends Throwable> |
public S |
orElseThrow(java.util.function.Supplier<? extends X> exceptionSupplier) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
name
- The nameloadedClass
- The loaded class