@Deprecated public class TplExpander extends Object
This uses Java Introspection to allow very basic functions to be called
on variables found thru the context. For a name like foo.bar it
will attempt to get an object by looking up the key foo in the
hash table. It will then look for a function that is called getBar()
or bar() on that object. When found it will call that function
and the result will be used for the next item in the dotted list.
| Modifier and Type | Field and Description |
|---|---|
protected TplCallback |
m_cb
Deprecated.
|
protected String |
m_hostname
Deprecated.
|
protected int |
m_hostport
Deprecated.
|
protected String |
m_hosturl
Deprecated.
|
protected String |
m_servlet_basepath
Deprecated.
|
protected String |
m_servlet_fullpath
Deprecated.
|
| Constructor and Description |
|---|
TplExpander(TplCallback cb)
Deprecated.
Constructor
|
TplExpander(TplCallback cb,
boolean html)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
expand(InputStream is,
PrintWriter pw)
Deprecated.
Expands the template to the printwriter spec'd.
|
String |
expand(String input)
Deprecated.
|
void |
expand(String input,
PrintWriter output)
Deprecated.
|
Object |
findName(String name)
Deprecated.
This function can be overridden to provide more predefined names.
|
protected Object |
findPredef(String name)
Deprecated.
If the name passed is a predefined name this function will return the
result object for the name.
|
protected Object |
locateName(String name)
Deprecated.
Locates a root name.
|
void |
putDummy(String name)
Deprecated.
This method posts the "dummy getter" method for a given name.
|
void |
putGetter(String name,
Object o)
Deprecated.
|
protected String |
slconc(String s1,
String s2)
Deprecated.
|
protected TplCallback m_cb
protected String m_servlet_basepath
protected String m_servlet_fullpath
protected String m_hosturl
protected String m_hostname
protected int m_hostport
public TplExpander(TplCallback cb)
public TplExpander(TplCallback cb, boolean html)
public void expand(InputStream is, PrintWriter pw) throws Exception
Exceptionpublic void expand(String input, PrintWriter output) throws Exception
Exceptionpublic Object findName(String name)
protected Object findPredef(String name)
protected Object locateName(String name) throws TplException
TplExceptionpublic void putDummy(String name)
Copyright © 2017 etc.to. All rights reserved.