Constructor and Description |
---|
DefaultScope(List<ProvidedInterface> aExternallyProvided)
Creates a new DefaultScope object.
|
DefaultScope(ProvidedInterface[] aExternallyProvided)
Creates a new DefaultScope object.
|
DefaultScope(ProvidedInterface[] aExternallyProvided,
List<Scope> aParent)
Creates a new DefaultScope object.
|
DefaultScope(ProvidedInterface[] aExternallyProvided,
Scope aParent)
Creates a new DefaultScope object.
|
Modifier and Type | Method and Description |
---|---|
void |
addRuntime(Component aComponent,
Object aRuntime)
Adds the runtime of a started component.
|
Object |
get(String aKey)
Retrieves a value for the key.
|
<T> T |
getInterfaceImplementation(ProvidedInterface aInterface,
Class<T> aType) |
List<ProvidedInterface> |
getProvidedInterfaces()
Gets the provided interfaces by this scope.
|
Object |
getRuntime(Component aComponent)
Gets the runtime for a component.
|
Object |
getRuntime(String aName)
Gets the runtime for a component based on the name of the component
(excluding its context).
|
void |
publishInterface(ProvidedInterface aInterface,
Object aImplementation)
Publishes an implementation of a provided interface.
|
void |
put(String aKey,
Object aValue)
Adds a key value pair to the scope.
|
public DefaultScope(List<ProvidedInterface> aExternallyProvided)
public DefaultScope(ProvidedInterface[] aExternallyProvided)
public DefaultScope(ProvidedInterface[] aExternallyProvided, Scope aParent)
public DefaultScope(ProvidedInterface[] aExternallyProvided, List<Scope> aParent)
public List<ProvidedInterface> getProvidedInterfaces()
Scope
getProvidedInterfaces
in interface Scope
public Object get(String aKey)
Scope
public void put(String aKey, Object aValue)
Scope
public void addRuntime(Component aComponent, Object aRuntime)
Scope
addRuntime
in interface Scope
aComponent
- Component.aRuntime
- Runtime.public Object getRuntime(Component aComponent)
Scope
getRuntime
in interface Scope
aComponent
- Component for which we want to get the runtime.public Object getRuntime(String aName)
Scope
getRuntime
in interface Scope
aName
- Component name.public void publishInterface(ProvidedInterface aInterface, Object aImplementation)
Scope
publishInterface
in interface Scope
aInterface
- Interface that is provided.aImplementation
- Implementation of the interface.public <T> T getInterfaceImplementation(ProvidedInterface aInterface, Class<T> aType)
getInterfaceImplementation
in interface Scope
Copyright © 2022. All rights reserved.