Interface WriteableType
-
- All Superinterfaces:
Type
- All Known Implementing Classes:
WriteableTypeImpl
public interface WriteableType extends Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Instance
addInstance(java.lang.String key, java.lang.Object bean)
Adds the instance with the given key to the typeInstance
addInstance(java.lang.String key, java.lang.Object bean, java.lang.Object metadata)
Adds the instance with the given key to the typejava.beans.PropertyChangeEvent[]
modifyInstance(java.lang.String key, java.lang.Object newBean, java.beans.PropertyChangeEvent... changes)
Modifies the instance with the given keyInstance
removeInstance(java.lang.String key)
Removes the instance with the given key from the type-
Methods inherited from interface org.glassfish.hk2.configuration.hub.api.Type
getInstance, getInstances, getMetadata, getName, setMetadata
-
-
-
-
Method Detail
-
addInstance
Instance addInstance(java.lang.String key, java.lang.Object bean)
Adds the instance with the given key to the type- Parameters:
key
- A non-null name for this beanbean
- The non-null bean to add- Returns:
- The instance that was created
-
addInstance
Instance addInstance(java.lang.String key, java.lang.Object bean, java.lang.Object metadata)
Adds the instance with the given key to the type- Parameters:
key
- A non-null name for this beanbean
- The non-null bean to addmetadata
- Possibly null metadata to be associated with this bean- Returns:
- The instance that was created
-
removeInstance
Instance removeInstance(java.lang.String key)
Removes the instance with the given key from the type- Parameters:
key
- A non-null name for this bean- Returns:
- The possibly null bean that was removed. If null then no bean was found with the given name
-
modifyInstance
java.beans.PropertyChangeEvent[] modifyInstance(java.lang.String key, java.lang.Object newBean, java.beans.PropertyChangeEvent... changes)
Modifies the instance with the given key- Parameters:
key
- A non-null name or key for the bean to modifynewBean
- The new bean to use with this keychanges
- The full set of changes from the previous version. If this is a zero-length array then the system will attempt to automatically determine the changes made to this type and will generate the list of PropertyChangeEvent to be associated with this modification- Returns:
- If changes has length greater than zero then this simply returns changes. If changes is zero length then this will return the set of changes automatically determined by the system
-
-