public class WriteableTypeImpl extends Object implements WriteableType
| Modifier and Type | Method and Description |
|---|---|
void |
addInstance(String key,
Object bean)
Adds the instance with the given key to the type
|
void |
addInstance(String key,
Object bean,
Object metadata)
Adds the instance with the given key to the type
|
Instance |
getInstance(String key)
Gets the instance associated with this key, or null if there is none
|
Map<String,Instance> |
getInstances()
Returns a read-only map of the instances that are associated with this type
|
Object |
getMetadata()
Gets information about this type.
|
String |
getName()
A unique identifier for this type
|
PropertyChangeEvent[] |
modifyInstance(String key,
Object newBean,
PropertyChangeEvent... propChanges)
Modifies the instance with the given key
|
Instance |
removeInstance(String key)
Removes the instance with the given key from the type
|
void |
setMetadata(Object metadata)
Sets an object containing information about this
type.
|
String |
toString() |
public String getName()
Typepublic Map<String,Instance> getInstances()
TypegetInstances in interface Typepublic Instance getInstance(String key)
TypegetInstance in interface Typekey - The non-null key for the instancepublic void addInstance(String key, Object bean)
WriteableTypeaddInstance in interface WriteableTypekey - A non-null name for this beanbean - The non-null bean to addpublic void addInstance(String key, Object bean, Object metadata)
WriteableTypeaddInstance in interface WriteableTypekey - A non-null name for this beanbean - The non-null bean to addmetadata - Possibly null metadata to be associated with this beanpublic Instance removeInstance(String key)
WriteableTyperemoveInstance in interface WriteableTypekey - A non-null name for this beanpublic PropertyChangeEvent[] modifyInstance(String key, Object newBean, PropertyChangeEvent... propChanges)
WriteableTypemodifyInstance in interface WriteableTypekey - A non-null name or key for the bean to modifynewBean - The new bean to use with this keypropChanges - 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 modificationpublic Object getMetadata()
TypegetMetadata in interface Typepublic void setMetadata(Object metadata)
TypesetMetadata in interface Typemetadata - The possibly null metadata
to be associated with this typeCopyright © 2009–2017 Oracle Corporation. All rights reserved.