org.apache.commons.validator
Class Var
java.lang.Objectorg.apache.commons.validator.Var
- java.lang.Cloneable, java.io.Serializable
public class Var
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
A variable that can be associated with a Field for
passing in information to a pluggable validator. Instances of this class are
configured with a <var> xml element.
- Serialized Form
static java.lang.String | JSTYPE_INT- Int Constant for JavaScript type.
|
static java.lang.String | JSTYPE_REGEXP- Regular Expression Constant for JavaScript type.
|
static java.lang.String | JSTYPE_STRING- String Constant for JavaScript type.
|
private java.lang.String | jsType- The optional JavaScript type of the variable.
|
private java.lang.String | name- The name of the variable.
|
private java.lang.String | value- The name of the value.
|
Var()
|
Var(java.lang.String name, java.lang.String value, java.lang.String jsType)
|
java.lang.Object | clone()- Creates and returns a copy of this object.
|
java.lang.String | getJsType()- Gets the JavaScript type of the variable.
|
java.lang.String | getName()- Gets the name of the variable.
|
java.lang.String | getValue()- Gets the value of the variable.
|
void | setJsType(java.lang.String jsType)- Sets the JavaScript type of the variable.
|
void | setName(java.lang.String name)- Sets the name of the variable.
|
void | setValue(java.lang.String value)- Sets the value of the variable.
|
java.lang.String | toString()- Returns a string representation of the object.
|
JSTYPE_INT
public static final java.lang.String JSTYPE_INT
Int Constant for JavaScript type. This can be used
when auto-generating JavaScript.
- "int"
JSTYPE_REGEXP
public static final java.lang.String JSTYPE_REGEXP
Regular Expression Constant for JavaScript type. This can be used
when auto-generating JavaScript.
- "regexp"
JSTYPE_STRING
public static final java.lang.String JSTYPE_STRING
String Constant for JavaScript type. This can be used
when auto-generating JavaScript.
- "string"
jsType
private java.lang.String jsType
The optional JavaScript type of the variable.
name
private java.lang.String name
The name of the variable.
value
private java.lang.String value
The name of the value.
Var
public Var(java.lang.String name,
java.lang.String value,
java.lang.String jsType)
clone
public java.lang.Object clone()
Creates and returns a copy of this object.
getJsType
public java.lang.String getJsType()
Gets the JavaScript type of the variable.
getName
public java.lang.String getName()
Gets the name of the variable.
getValue
public java.lang.String getValue()
Gets the value of the variable.
setJsType
public void setJsType(java.lang.String jsType)
Sets the JavaScript type of the variable.
setName
public void setName(java.lang.String name)
Sets the name of the variable.
setValue
public void setValue(java.lang.String value)
Sets the value of the variable.
toString
public java.lang.String toString()
Returns a string representation of the object.
Copyright (c) 2001-2004 Apache Software Foundation