com.googlecode.openbeans
Class FeatureDescriptor

java.lang.Object
  extended by com.googlecode.openbeans.FeatureDescriptor
Direct Known Subclasses:
BeanDescriptor, EventSetDescriptor, MethodDescriptor, ParameterDescriptor, PropertyDescriptor

public class FeatureDescriptor
extends Object

Common base class for Descriptors.


Constructor Summary
FeatureDescriptor()
           Constructs an instance.
 
Method Summary
 Enumeration<String> attributeNames()
           Enumerates the attribute names.
 String getDisplayName()
           Gets the display name or getName() if not set.
 String getName()
           Gets the name.
 String getShortDescription()
           Gets the short description or getDisplayName() if not set.
 Object getValue(String attributeName)
           Gets the value associated with the named attribute.
 boolean isExpert()
           Indicates if this feature is an expert feature.
 boolean isHidden()
           Indicates if this feature is hidden.
 boolean isPreferred()
           Indicates if this feature is preferred.
 void setDisplayName(String displayName)
           Sets the display name.
 void setExpert(boolean expert)
           Sets the expert indicator.
 void setHidden(boolean hidden)
           Sets the hidden indicator.
 void setName(String name)
           Sets the name.
 void setPreferred(boolean preferred)
           Sets the preferred indicator.
 void setShortDescription(String text)
           Sets the short description.
 void setValue(String attributeName, Object value)
           Sets the value for the named attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureDescriptor

public FeatureDescriptor()

Constructs an instance.

Method Detail

setValue

public void setValue(String attributeName,
                     Object value)

Sets the value for the named attribute.

Parameters:
attributeName - The name of the attribute to set a value with.
value - The value to set.

getValue

public Object getValue(String attributeName)

Gets the value associated with the named attribute.

Parameters:
attributeName - The name of the attribute to get a value for.
Returns:
The attribute's value.

attributeNames

public Enumeration<String> attributeNames()

Enumerates the attribute names.

Returns:
An instance of Enumeration.

setShortDescription

public void setShortDescription(String text)

Sets the short description.

Parameters:
text - The description to set.

setName

public void setName(String name)

Sets the name.

Parameters:
name - The name to set.

setDisplayName

public void setDisplayName(String displayName)

Sets the display name.

Parameters:
displayName - The display name to set.

getShortDescription

public String getShortDescription()

Gets the short description or getDisplayName() if not set.

Returns:
The description.

getName

public String getName()

Gets the name.

Returns:
The name.

getDisplayName

public String getDisplayName()

Gets the display name or getName() if not set.

Returns:
The display name.

setPreferred

public void setPreferred(boolean preferred)

Sets the preferred indicator.

Parameters:
preferred - true if preferred, false otherwise.

setHidden

public void setHidden(boolean hidden)

Sets the hidden indicator.

Parameters:
hidden - true if hidden, false otherwise.

setExpert

public void setExpert(boolean expert)

Sets the expert indicator.

Parameters:
expert - true if expert, false otherwise.

isPreferred

public boolean isPreferred()

Indicates if this feature is preferred.

Returns:
true if preferred, false otherwise.

isHidden

public boolean isHidden()

Indicates if this feature is hidden.

Returns:
true if hidden, false otherwise.

isExpert

public boolean isExpert()

Indicates if this feature is an expert feature.

Returns:
true if hidden, false otherwise.


Copyright © 2013. All Rights Reserved.