public class Var extends Object implements Cloneable, Serializable
Field for
passing in information to a pluggable validator. Instances of this class are
configured with a <var> xml element.| Modifier and Type | Field and Description |
|---|---|
static String |
JSTYPE_INT
Int Constant for JavaScript type.
|
static String |
JSTYPE_REGEXP
Regular Expression Constant for JavaScript type.
|
static String |
JSTYPE_STRING
String Constant for JavaScript type.
|
| Constructor and Description |
|---|
Var()
Default Constructor.
|
Var(String name,
String value,
String jsType)
Constructs a variable with a specified name, value
and Javascript type.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates and returns a copy of this object.
|
String |
getBundle()
Returns the resource bundle name.
|
String |
getJsType()
Gets the JavaScript type of the variable.
|
String |
getName()
Gets the name of the variable.
|
String |
getValue()
Gets the value of the variable.
|
boolean |
isResource()
Tests whether or not the value is a resource key or literal value.
|
void |
setBundle(String bundle)
Sets the resource bundle name.
|
void |
setJsType(String jsType)
Sets the JavaScript type of the variable.
|
void |
setName(String name)
Sets the name of the variable.
|
void |
setResource(boolean resource)
Sets whether or not the value is a resource.
|
void |
setValue(String value)
Sets the value of the variable.
|
String |
toString()
Returns a string representation of the object.
|
public static final String JSTYPE_INT
public static final String JSTYPE_STRING
public static final String JSTYPE_REGEXP
public String getName()
public void setName(String name)
name - The name of the variable.public String getValue()
public void setValue(String value)
value - The value of the variable.public boolean isResource()
true if value is a resource key.public void setResource(boolean resource)
resource - If true indicates the value is a resource.public String getBundle()
public void setBundle(String bundle)
bundle - The new bundle name.public String getJsType()
public void setJsType(String jsType)
jsType - The Javascript type of the variable.public Object clone()
Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.