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 IlpAttribute
protected 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 IlpAttribute
protected void setValueClass(Class<?> c)
c
- New value classpublic Object getDefaultValue()
IlpAttributeValueHolder.VALUE_NOT_SET
.getDefaultValue
in interface IlpAttribute
IlpDefaultObject.initializeDefaultValues()
,
IlpDefaultObject.IlpDefaultObject(IlpClass, Object, boolean)
protected void setDefaultValue(Object v)
IlpAttributeValueHolder.VALUE_NOT_SET
public IlpAttributeGroup getAttributeGroup()
getAttributeGroup
in interface IlpAttribute
public void setAttributeGroup(IlpAttributeGroup group)
null
when the attribute is
removed from the attribute group.setAttributeGroup
in interface IlpAttribute
public boolean isTransient()
isTransient
in interface IlpAttribute
protected void setTransient(boolean t)
t
- the attribute is transient, that is, NOT persistent.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.