|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jameleon.bean.Attribute
public class Attribute
Field Summary | |
---|---|
protected String |
contextName
The name of this attribute's instance variable in the function tag. |
protected String |
defaultValue
The default value of the attribute |
protected String |
description
A description about how the attribute is used |
protected boolean |
instanceVariable
Describes whether this attribute represents an instance variable or set method. |
protected String |
name
The attribute's name |
protected boolean |
required
Whether this attribute is required or not |
protected String |
type
The type of the attribute |
protected Object |
value
The value of the attribute |
protected boolean |
valueSet
Used to keep track if whether the value of this attribute was set or not |
Constructor Summary | |
---|---|
Attribute()
Default constructor only used to initialize variables |
Method Summary | |
---|---|
Object |
clone()
|
String |
getContextName()
Gets the name of the context variable that the value of the this attribute will be bound to |
String |
getDefaultValue()
|
String |
getDescription()
|
String |
getDisplayedValue()
|
String |
getName()
|
String |
getType()
|
Object |
getValue()
|
boolean |
isContextVariable()
Tells if this attribute represents something that is bound to a context variable |
boolean |
isInstanceVariable()
Tells if this attribute represents an instance variable or set method |
boolean |
isRequired()
|
boolean |
isValueSet()
|
void |
setContextName(String contextName)
Sets the name of the context variable that the value of the this attribute will be bound to |
void |
setDefaultValue(String defaultValue)
Sets the attribute's default value |
void |
setDescription(String description)
Sets the description about how the attribute is used |
void |
setInstanceVariable(boolean instanceVariable)
Sets this attribute to an instance variable true or a set method false |
void |
setName(String name)
Sets the attribute's name |
void |
setRequired(boolean required)
Sets the attribute to a required or non-required attribute |
void |
setType(String type)
Sets the type of the attribute |
void |
setValue(Object value)
Sets the attribute's value |
String |
toString()
|
String |
toXML()
Implement this method the same way the toString method would be implemented, except
the object's information should be in a valid XML format. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String name
protected String description
protected String type
protected boolean required
protected Object value
protected String defaultValue
protected String contextName
protected boolean instanceVariable
false
protected boolean valueSet
Constructor Detail |
---|
public Attribute()
Method Detail |
---|
public String getName()
public void setName(String name)
name
- - The attribute's namepublic String getDescription()
public void setDescription(String description)
description
- - The description about how the attribute is usedpublic String getType()
public void setType(String type)
type
- - The type of the attributepublic boolean isRequired()
true
if this attribute is requiredpublic boolean isValueSet()
true
if the value of the attribute was setpublic void setRequired(boolean required)
required
- - true
if this attribute is requiredpublic Object getValue()
public void setValue(Object value)
value
- - The attribute's valuepublic String getDefaultValue()
public void setDefaultValue(String defaultValue)
defaultValue
- - The attribute's default valuepublic String getDisplayedValue()
public String getContextName()
public void setContextName(String contextName)
contextName
- - The name of context variable that the value of this attribute will be bound topublic boolean isInstanceVariable()
true
if this attribute represents an instance variable and false
if it represents a set method. If both a set method and instance variable exist for
this attribute, then the set method should be called, and this should return false
public boolean isContextVariable()
public void setInstanceVariable(boolean instanceVariable)
true
or a set method false
instanceVariable
- - Set to true
if an instance variable or false
if this attribute represents a set method. If both a set method and instance variable exist for
this attribute, then the set method should be called, and this should be set to false
public String toXML()
XMLable
toString
method would be implemented, except
the object's information should be in a valid XML format.
toXML
in interface XMLable
public String toString()
toString
in class Object
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |