| java.lang.Object org.netbeans.modules.visualweb.insync.beans.BeansNode org.netbeans.modules.visualweb.insync.beans.Bean
All known Subclasses: org.netbeans.modules.visualweb.insync.faces.MarkupBean,
Bean | public class Bean extends BeansNode (Code) | | Representation of a JavaBean instance field within our outer host BeansUnit being built. Initial
property settings are maintained as Property instances, and handled events are maintained as
Events within EventSets.
author: cquinn |
Method Summary | |
public void | addChild(Bean child, Position pos) Add a child bean to this bean at a given location. | public void | bindCleanup() | public Bean | bindParent() | public boolean | canSetName() Can the name of this bean be set? Default is to always say yes. | public BeanInfo | getBeanInfo() | public Bean[] | getChildren() | public String | getCleanupMethod() | public org.w3c.dom.Element | getElement() | public EventSet | getEventSet(String name) Get an EventSet of this bean by name. | public EventSetDescriptor | getEventSetDescriptor(String name) Get the descriptor for an event set of this bean indicated by the event set name. | public EventSetDescriptor | getEventSetDescriptorForAdder(String adderName) Get the descriptor for an event set of this bean indicated by the event set's adder method
name.
Parameters: adderName - Event set adder method name. | public EventSet[] | getEventSets() | public String | getName() | public Bean | getParent() | public Property[] | getProperties() | public Property | getProperty(String name) Get a Property of this bean by name. | public PropertyDescriptor | getPropertyDescriptor(String propertyName) | public PropertyDescriptor | getPropertyDescriptorForSetter(String setterName) | public String | getScope() If I return null, indicates I could not determine scope. | public Class | getType() | public List<String> | getTypeParameterNames() | public boolean | hasGetter() | public boolean | isGetterRequired() | public boolean | isInserted() | public boolean | isMarkupProperty(PropertyDescriptor pd) Determines if a given Property, defined by its PropertyDescriptor, is a markup based Property
or not. | public boolean | isParentCapable() | public boolean | isSetterRequired() | protected EventSet | newCreatedEventSet(EventSetDescriptor esd) Create a new EventSet object. | protected Property | newCreatedProperty(PropertyDescriptor pd) Create a new property object ready to have its value set. | public boolean | performInstanceParenting(Object instance, Object parent, Position pos) Given an instance for this bean and it's parent, perform the appropriate operation on those
objects to establish the live parent-child relationship. | public void | performInstanceUnparenting(Object instance, Object parent) Same as performInstanceParenting(), except performs the un-parenting. | public void | releaseEventSet(EventSet es) Remove a logical event set and release its hold on the source elements, but do not actually
remove the source. | public void | removeChild(Bean child) Remove a child bean from this bean. | public boolean | removeEntry() Remove this bean's field, methods and statements from the host class. | public EventSet | setEventSet(String name) Set (hook) a given event set indicated by name. | public void | setInserted(boolean inserted) | public String | setName(String newname, boolean autoNumber, DesignBean liveBean) Set the name of this bean, affects the field name as well as the accessor method names
Parameters: newname - The new name to give this bean, possibly as a base for suffixes. Parameters: autoNumber - If true, name will be suffixed with a number if needed to make it unique Parameters: liveBean - The referencing liveBean for possible naming fixup callback The new name, after any fixup or numbering. | public Property | setProperty(String name, Object value, String valueSource) Set a property, identified by name, to a given value or value source. | public boolean | shouldInsertCleanupEntry() | public void | toString(StringBuffer sb) | public void | unsetEventSet(EventSet es) Unset (unhook) a given EventSet and remove its source representation. | public void | unsetEventSet(String name) Unset (unhook) a given EventSet, indicated by name, and remove its source representation. | public void | unsetProperty(Property p) Unset (remove) a given property from this bean. | public void | unsetProperty(String name) Unset (remove) a given property, indicated by name, from this bean. |
CREATE_GETTER | final static boolean CREATE_GETTER(Code) | | |
CREATE_SETTER | final static boolean CREATE_SETTER(Code) | | |
EMPTY_ARRAY | final public static Bean[] EMPTY_ARRAY(Code) | | |
Bean | protected Bean(BeansUnit unit, BeanInfo beanInfo, String name)(Code) | | Construct a new created bean
Parameters: unit - Parameters: beanInfo - Parameters: name - |
Bean | protected Bean(BeansUnit unit, BeanInfo beanInfo, String name, List<String> typeNames)(Code) | | Construct a new bean bound to existing field & accessor methods
Parameters: unit - Owning host unit Parameters: beanInfo - Parameters: name - Parameters: typeNames - |
addChild | public void addChild(Bean child, Position pos)(Code) | | Add a child bean to this bean at a given location.
Parameters: child - The child bean to add Parameters: pos - The position within the children to add the given child |
bindCleanup | public void bindCleanup()(Code) | | Bind to an existing cleanup method call within the unit's cleanup method body
|
bindParent | public Bean bindParent()(Code) | | Take the opportinuty to scan for and bind to this bean's parent
the parent of this bean iff not previously bound |
canSetName | public boolean canSetName()(Code) | | Can the name of this bean be set? Default is to always say yes.
true iff the name of this bean can be set |
getBeanInfo | public BeanInfo getBeanInfo()(Code) | | the beanInfo for this bean |
getChildren | public Bean[] getChildren()(Code) | | the array of child beans--zero size if none currently, or null if this is not aparent See Also: isParentCapable |
getCleanupMethod | public String getCleanupMethod()(Code) | | Get the cleanup method name for this bean if it has one
the cleanup method name |
getEventSet | public EventSet getEventSet(String name)(Code) | | Get an EventSet of this bean by name.
Parameters: name - The EventSet name to look for EventSet of this bean with the given name, or null if not found. |
getEventSetDescriptor | public EventSetDescriptor getEventSetDescriptor(String name)(Code) | | Get the descriptor for an event set of this bean indicated by the event set name.
Parameters: name - the event set name to lookup The EventSetDescriptor for the given event set |
getEventSetDescriptorForAdder | public EventSetDescriptor getEventSetDescriptorForAdder(String adderName)(Code) | | Get the descriptor for an event set of this bean indicated by the event set's adder method
name.
Parameters: adderName - Event set adder method name. The EventSetDescriptor for the given event set |
getEventSets | public EventSet[] getEventSets()(Code) | | An array of EventSet instances representing the hooked event sets for this bean. |
getName | public String getName()(Code) | | the instance name of this bean, null if dead. |
getParent | public Bean getParent()(Code) | | the parent of this bean, null if top-level bean or dead |
getProperties | public Property[] getProperties()(Code) | | An array of Property instances representing the set properties for this bean. |
getProperty | public Property getProperty(String name)(Code) | | Get a Property of this bean by name.
Parameters: name - The Property name to look up The Property if found, null if not. |
getPropertyDescriptor | public PropertyDescriptor getPropertyDescriptor(String propertyName)(Code) | | Get the PropertyDescriptor for a property of this bean indicated by the property name
Parameters: propertyName - the property name to look for the PropertyDescriptor for the property |
getPropertyDescriptorForSetter | public PropertyDescriptor getPropertyDescriptorForSetter(String setterName)(Code) | | Get the PropertyDescriptor for a property of this bean indicated by the property setter
method name
Parameters: setterName - the setter method name to lookup the property by the PropertyDescriptor for the property |
getScope | public String getScope()(Code) | | If I return null, indicates I could not determine scope.
"request", "session", "application"
|
getType | public Class getType()(Code) | | the type of this bean |
hasGetter | public boolean hasGetter()(Code) | | whether there is a getter method available |
isGetterRequired | public boolean isGetterRequired()(Code) | | |
isInserted | public boolean isInserted()(Code) | | |
isMarkupProperty | public boolean isMarkupProperty(PropertyDescriptor pd)(Code) | | Determines if a given Property, defined by its PropertyDescriptor, is a markup based Property
or not.
Parameters: pd - PropertyDescriptor that identifies the property True iff this bean is markup based and the particular property is also. |
isParentCapable | public boolean isParentCapable()(Code) | | true if this bean is capable of being a parent |
isSetterRequired | public boolean isSetterRequired()(Code) | | |
newCreatedEventSet | protected EventSet newCreatedEventSet(EventSetDescriptor esd)(Code) | | Create a new EventSet object. Overridden in subclasses to create different EventSet
subclasses based on information in the descriptor.
Parameters: esd - The descriptor that defines the EventSet. The newly created EventSet object, never null. |
newCreatedProperty | protected Property newCreatedProperty(PropertyDescriptor pd)(Code) | | Create a new property object ready to have its value set. Overridden in subclasses to create
different property subclasses based on information in the descriptor.
Parameters: pd - The descriptor that defines the property The newly created property object, never null. |
performInstanceParenting | public boolean performInstanceParenting(Object instance, Object parent, Position pos)(Code) | | Given an instance for this bean and it's parent, perform the appropriate operation on those
objects to establish the live parent-child relationship.
Overridden in subclasses that know about specific bean parent-child relationships
Parameters: instance - the bean instance to parent Parameters: parent - the parent to parent to true if done parenting, or false to be re-called with parent's parent |
performInstanceUnparenting | public void performInstanceUnparenting(Object instance, Object parent)(Code) | | Same as performInstanceParenting(), except performs the un-parenting.
Parameters: instance - the bean instance to parent Parameters: parent - the parent to parent to |
releaseEventSet | public void releaseEventSet(EventSet es)(Code) | | Remove a logical event set and release its hold on the source elements, but do not actually
remove the source. Used when some other modelling code will take over.
Parameters: es - EventSet to release. |
removeChild | public void removeChild(Bean child)(Code) | | Remove a child bean from this bean.
Parameters: child - |
removeEntry | public boolean removeEntry()(Code) | | Remove this bean's field, methods and statements from the host class. This bean instance is
dead & should not be used.
true iff the source entry for this bean was actually removed. |
setEventSet | public EventSet setEventSet(String name)(Code) | | Set (hook) a given event set indicated by name. A new EventSet will be created if needed.
Parameters: name - The EventSet name to set. The existing or newly created EventSet. |
setInserted | public void setInserted(boolean inserted)(Code) | | |
setName | public String setName(String newname, boolean autoNumber, DesignBean liveBean)(Code) | | Set the name of this bean, affects the field name as well as the accessor method names
Parameters: newname - The new name to give this bean, possibly as a base for suffixes. Parameters: autoNumber - If true, name will be suffixed with a number if needed to make it unique Parameters: liveBean - The referencing liveBean for possible naming fixup callback The new name, after any fixup or numbering. Null if naming failed. |
setProperty | public Property setProperty(String name, Object value, String valueSource)(Code) | | Set a property, identified by name, to a given value or value source. Both the value instance
and source must be provided. A new property will be created to hold this setting if needed.
Parameters: name - The name of the property to set. Parameters: value - The instance of the value to set Parameters: valueSource - The source string that represents the value The property that was set and possibly created, or null if the property was not found |
shouldInsertCleanupEntry | public boolean shouldInsertCleanupEntry()(Code) | | |
unsetEventSet | public void unsetEventSet(EventSet es)(Code) | | Unset (unhook) a given EventSet and remove its source representation.
Parameters: es - EventSet to unset. |
unsetEventSet | public void unsetEventSet(String name)(Code) | | Unset (unhook) a given EventSet, indicated by name, and remove its source representation.
Parameters: name - EventSet name to unset. |
unsetProperty | public void unsetProperty(Property p)(Code) | | Unset (remove) a given property from this bean.
Parameters: p - Property to unset & remove. |
unsetProperty | public void unsetProperty(String name)(Code) | | Unset (remove) a given property, indicated by name, from this bean.
Parameters: name - Property name to unset and remove. |
|
|