Class Reference
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
Provides a channel by referencing it from a a set of named-channels.
This class extends ChannelProvider
to retrieve a channel by its ID from a named
provider. It also offers an option to duplicate the retrieved channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()
Gets or creates an object of typeT
.getId()
The ID of the channel to retrieve from the named-provider.boolean
If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.void
setDuplicate
(boolean duplicate) If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.void
The ID of the channel to retrieve from the named-provider.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStack
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
Reference
Creates a new instance with a specified channel ID.- Parameters:
id
- the ID of the channel to retrieve
-
Reference
public Reference()
-
-
Method Details
-
get
Description copied from interface:Provider
Gets or creates an object of typeT
.- Returns:
- the object returned by the provider.
- Throws:
ProvisionFailedException
- if the object cannot be returned.
-
getId
The ID of the channel to retrieve from the named-provider. -
setId
The ID of the channel to retrieve from the named-provider. -
isDuplicate
public boolean isDuplicate()If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.This is a shortcut to avoid embedding beans in a ChannelProviderDuplicate.
-
setDuplicate
public void setDuplicate(boolean duplicate) If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.This is a shortcut to avoid embedding beans in a ChannelProviderDuplicate.
-