org.apache.velocity.test.provider

Class TestProvider


public class TestProvider
extends java.lang.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,v 1.21 2001/11/19 13:55:30 geirm Exp $

Author:
Jason van Zyl

Field Summary

static String
PUB_STAT_STRING
(package private) Object
ob
(package private) boolean
state
(package private) int
stateint
(package private) String
title

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()

Field Details

PUB_STAT_STRING

public static String PUB_STAT_STRING


ob

(package private)  Object ob


state

(package private)  boolean state


stateint

(package private)  int stateint


title

(package private)  String title

Method Details

allEmpty

public boolean allEmpty(Object[] list)


bang

public Integer bang()


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.


concat

public String concat(List strings)


concat

public String concat(Object[] strings)


concat

public String concat(String a,
                     String b)


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.


getArray

public String[] getArray()


getChild

public Child getChild()


getCustomers

public ArrayList getCustomers()


getCustomers2

public ArrayList getCustomers2()


getEmptyList

public List getEmptyList()


getFoo

public String getFoo()
            throws Exception


getHashtable

public Hashtable getHashtable()


getList

public List getList()


getMenu

public Object[] getMenu()


getName

public String getName()


getPerson

public Person getPerson()


getRelSearches

public ArrayList getRelSearches()


getSearch

public Hashtable getSearch()


getStack

public Stack getStack()


getStateFalse

public boolean getStateFalse()


getStateTrue

public boolean getStateTrue()


getThrow

public String getThrow()
            throws Exception


getTitle

public String getTitle()


getVector

public Vector getVector()


me

public Object me()


objConcat

public String objConcat(List objects)


objectArrayMethod

public String objectArrayMethod(Object[] o)


parse

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


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.


setBangStart

public void setBangStart(Integer i)


setState

public void setState(Boolean state)


setTitle

public void setTitle(String title)


showPerson

public String showPerson(Person person)


theAPLRules

public boolean theAPLRules()


toString

public String toString()


Copyright © 2003 Apache Software Foundation. All Rights Reserved.