org.apache.velocity.test.provider
Class TestProvider

java.lang.Object
  extended by org.apache.velocity.test.provider.TestProvider

public class TestProvider
extends Object

This class is used by the testbed. Instances of the class are fed into the context that is set before the AST is traversed and dynamic content generated.

Version:
$Id: TestProvider.java 463298 2006-10-12 16:10:32Z henning $
Author:
Jason van Zyl

Field Summary
static String PUB_STAT_STRING
           
 
Constructor Summary
TestProvider()
           
 
Method Summary
 boolean allEmpty(Object[] list)
           
 Integer bang()
           
 String chop(String string, int i)
          Chop i characters off the end of a string.
 String concat(List strings)
           
 String concat(Object[] strings)
           
 String concat(String a, String b)
           
 String get(String key)
          Test the ability of vel to use a get(key) method for any object type, not just one that implements the Map interface.
 String[] getArray()
           
 Child getChild()
           
 ArrayList getCustomers()
           
 ArrayList getCustomers2()
           
 List getEmptyList()
           
 String getFoo()
           
 Hashtable getHashtable()
           
 List getList()
           
 Object[] getMenu()
           
 String getName()
           
 Person getPerson()
           
 ArrayList getRelSearches()
           
 Hashtable getSearch()
           
 Stack getStack()
           
 boolean getStateFalse()
           
 boolean getStateTrue()
           
 String getThrow()
           
 String getTitle()
           
 Vector getVector()
           
 Object me()
           
 String objConcat(List objects)
           
 String objectArrayMethod(Object[] o)
           
 String parse(String a, Object o, String c, String d)
           
 String put(String key, Object o)
          Test the ability of vel to use a put(key) method for any object type, not just one that implements the Map interface.
 void setBangStart(Integer i)
           
 void setState(Boolean state)
           
 void setTitle(String title)
           
 String showPerson(Person person)
           
 boolean theAPLRules()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PUB_STAT_STRING

public static String PUB_STAT_STRING
Constructor Detail

TestProvider

public TestProvider()
Method Detail

getName

public String getName()

getStack

public Stack getStack()

getEmptyList

public List getEmptyList()

getList

public List getList()

getSearch

public Hashtable getSearch()

getHashtable

public Hashtable getHashtable()

getRelSearches

public ArrayList getRelSearches()

getTitle

public String getTitle()

setTitle

public void setTitle(String title)

getMenu

public Object[] getMenu()

getCustomers

public ArrayList getCustomers()

getCustomers2

public ArrayList getCustomers2()

me

public Object me()

toString

public String toString()
Overrides:
toString in class Object

getVector

public Vector getVector()

getArray

public String[] getArray()

theAPLRules

public boolean theAPLRules()

getStateTrue

public boolean getStateTrue()

getStateFalse

public boolean getStateFalse()

objectArrayMethod

public String objectArrayMethod(Object[] o)

concat

public String concat(Object[] strings)

concat

public String concat(List strings)

objConcat

public String objConcat(List objects)

parse

public String parse(String a,
                    Object o,
                    String c,
                    String d)

concat

public String concat(String a,
                     String b)

getPerson

public Person getPerson()

getChild

public Child getChild()

showPerson

public String showPerson(Person person)

chop

public String chop(String string,
                   int i)
Chop i characters off the end of a string.

Parameters:
string - String to chop.
i - Number of characters to chop.
Returns:
String with processed answer.

allEmpty

public boolean allEmpty(Object[] list)

setState

public void setState(Boolean state)

setBangStart

public void setBangStart(Integer i)

bang

public Integer bang()

get

public String get(String key)
Test the ability of vel to use a get(key) method for any object type, not just one that implements the Map interface.


put

public String put(String key,
                  Object o)
Test the ability of vel to use a put(key) method for any object type, not just one that implements the Map interface.


getFoo

public String getFoo()
              throws Exception
Throws:
Exception

getThrow

public String getThrow()
                throws Exception
Throws:
Exception


Copyright © 2000-2010 The Apache Software Foundation. All Rights Reserved.