org.apache.commons.jelly.impl
Class Attribute

java.lang.Object
  extended by org.apache.commons.jelly.impl.Attribute

public class Attribute
extends java.lang.Object

Represents the attribute definition used by dynamic tags, such as whether the attribute is required or any default values etc.

Version:
$Revision: 1807798 $
Author:
James Strachan

Field Summary
private  Expression defaultValue
          the default value expression
private  java.lang.String name
          the name of the attribute
private  boolean required
          whether this attribute is required
 
Constructor Summary
Attribute()
           
 
Method Summary
 Expression getDefaultValue()
          Returns the defaultValue.
 java.lang.String getName()
          Returns the name.
 boolean isRequired()
          Returns whether this attribute is required.
 void setDefaultValue(Expression defaultValue)
          Sets the defaultValue.
 void setName(java.lang.String name)
          Sets the name.
 void setRequired(boolean required)
          Sets whether this attribute is required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name
the name of the attribute


defaultValue

private Expression defaultValue
the default value expression


required

private boolean required
whether this attribute is required

Constructor Detail

Attribute

public Attribute()
Method Detail

isRequired

public boolean isRequired()
Returns whether this attribute is required.

Returns:
boolean

setRequired

public void setRequired(boolean required)
Sets whether this attribute is required.

Parameters:
required - is true if this attribute is a mandatory attribute

getName

public java.lang.String getName()
Returns the name.

Returns:
String

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - The name to set

getDefaultValue

public Expression getDefaultValue()
Returns the defaultValue.

Returns:
Expression

setDefaultValue

public void setDefaultValue(Expression defaultValue)
Sets the defaultValue.

Parameters:
defaultValue - The defaultValue to set