public class IlpDefaultAttribute extends Object implements IlpAttribute
IlpClass,
IlpAttributeGroup| Constructor and Description |
|---|
IlpDefaultAttribute(String name,
Class<?> valueClass)
Constructor.
|
IlpDefaultAttribute(String name,
Class<?> valueClass,
boolean isTransient)
Constructor.
|
IlpDefaultAttribute(String name,
Class<?> valueClass,
Object defaultValue)
Constructor.
|
IlpDefaultAttribute(String name,
Class<?> valueClass,
Object defaultValue,
boolean isTransient)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IlpAttributeGroup |
getAttributeGroup()
Returns the attribute group where this attribute has been
defined.
|
Object |
getDefaultValue()
Returns the default value for this attribute.
|
String |
getName()
Returns the name of the invoking attribute.
|
Class<?> |
getValueClass()
Returns the attribute value class.
|
boolean |
isTransient()
Indicates whether this attribute should be persistent or not.
|
void |
setAttributeGroup(IlpAttributeGroup group)
Sets the attribute group; can be
null when the attribute is
removed from the attribute group. |
protected void |
setDefaultValue(Object v)
Sets the default value for this attribute.
|
protected void |
setName(String s)
Sets the name of the invoking attribute.
|
protected void |
setTransient(boolean t)
Sets whether this attribute should be persistent or not.
|
protected void |
setValueClass(Class<?> c)
Sets the attribute value class.
|
String |
toString()
Converts the object into a human-readable format.
|
public IlpDefaultAttribute(String name, Class<?> valueClass)
name - Attribute name.valueClass - Attribute value class.public IlpDefaultAttribute(String name, Class<?> valueClass, boolean isTransient)
name - Attribute name.valueClass - Attribute value class.isTransient - true if the attribute is not persistent.public IlpDefaultAttribute(String name, Class<?> valueClass, Object defaultValue)
name - Attribute name.valueClass - Attribute value class.defaultValue - Default value for this attribute.public IlpDefaultAttribute(String name, Class<?> valueClass, Object defaultValue, boolean isTransient)
name - Attribute name.valueClass - Attribute value class.defaultValue - Default value for this attribute.isTransient - true if the attribute is not persistent.public String getName()
getName in interface IlpAttributeprotected void setName(String s)
The name of the attribute is used as its identifier and should not be modified after adding the attribute to an attribute group.
public Class<?> getValueClass()
getValueClass in interface IlpAttributeprotected void setValueClass(Class<?> c)
c - New value classpublic Object getDefaultValue()
IlpAttributeValueHolder.VALUE_NOT_SET.getDefaultValue in interface IlpAttributeIlpDefaultObject.initializeDefaultValues(),
IlpDefaultObject.IlpDefaultObject(IlpClass, Object, boolean)protected void setDefaultValue(Object v)
IlpAttributeValueHolder.VALUE_NOT_SETpublic IlpAttributeGroup getAttributeGroup()
getAttributeGroup in interface IlpAttributepublic void setAttributeGroup(IlpAttributeGroup group)
null when the attribute is
removed from the attribute group.setAttributeGroup in interface IlpAttributepublic boolean isTransient()
isTransient in interface IlpAttributeprotected void setTransient(boolean t)
t - the attribute is transient, that is, NOT persistent.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.