JSPTemplates

org.tp23.jasper.runtime
Class JspRuntimeLibrary

java.lang.Object
  |
  +--org.tp23.jasper.runtime.JspRuntimeLibrary

public class JspRuntimeLibrary
extends java.lang.Object

Bunch of util methods that are used by code generated for useBean, getProperty and setProperty. The __begin, __end stuff is there so that the JSP engine can actually parse this file and inline them if people don't want runtime dependencies on this class. However, I'm not sure if that works so well right now. It got forgotten at some point. -akv

Author:
Mandar Raje, Paul Hinds

Constructor Summary
JspRuntimeLibrary()
           
 
Method Summary
static java.lang.Object convert(java.lang.String s, java.lang.Class t)
           
static void createTypedArray(java.lang.Object bean, java.lang.reflect.Method method, java.lang.String[] values, java.lang.Class t)
          Create a typed array.
static java.lang.String decode(java.lang.String encoded)
          Decode an URL formatted string.
static java.lang.String escapeQueryString(java.lang.String unescString)
          Escape special shell characters.
static java.lang.reflect.Method getReadMethod(java.lang.Class beanClass, java.lang.String prop)
           
static java.lang.reflect.Method getWriteMethod(java.lang.Class beanClass, java.lang.String prop)
           
static java.lang.Object handleGetProperty(java.lang.Object o, java.lang.String prop)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, boolean value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, byte value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, char value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, double value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, float value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, int value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, long value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, java.lang.Object value)
           
static void handleSetProperty(java.lang.Object bean, java.lang.String prop, short value)
           
static void introspect(java.lang.Object bean, javax.servlet.ServletRequest request)
           
static void introspecthelper(java.lang.Object bean, java.lang.String prop, java.lang.String value, javax.servlet.ServletRequest request, java.lang.String param, boolean ignoreMethodNF)
           
static java.lang.String toString(boolean b)
           
static java.lang.String toString(byte b)
           
static java.lang.String toString(char c)
           
static java.lang.String toString(double d)
           
static java.lang.String toString(float f)
           
static java.lang.String toString(int i)
           
static java.lang.String toString(long l)
           
static java.lang.String toString(java.lang.Object o)
           
static java.lang.String toString(short s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspRuntimeLibrary

public JspRuntimeLibrary()
Method Detail

convert

public static java.lang.Object convert(java.lang.String s,
                                       java.lang.Class t)
                                throws JasperException

introspect

public static void introspect(java.lang.Object bean,
                              javax.servlet.ServletRequest request)
                       throws JasperException

introspecthelper

public static void introspecthelper(java.lang.Object bean,
                                    java.lang.String prop,
                                    java.lang.String value,
                                    javax.servlet.ServletRequest request,
                                    java.lang.String param,
                                    boolean ignoreMethodNF)
                             throws JasperException

toString

public static java.lang.String toString(java.lang.Object o)

toString

public static java.lang.String toString(byte b)

toString

public static java.lang.String toString(boolean b)

toString

public static java.lang.String toString(short s)

toString

public static java.lang.String toString(int i)

toString

public static java.lang.String toString(float f)

toString

public static java.lang.String toString(long l)

toString

public static java.lang.String toString(double d)

toString

public static java.lang.String toString(char c)

createTypedArray

public static void createTypedArray(java.lang.Object bean,
                                    java.lang.reflect.Method method,
                                    java.lang.String[] values,
                                    java.lang.Class t)
                             throws JasperException
Create a typed array. This is a special case where params are passed through the request and the property is indexed.

escapeQueryString

public static java.lang.String escapeQueryString(java.lang.String unescString)
Escape special shell characters.
Parameters:
unescString - The string to shell-escape
Returns:
The escaped shell string.

decode

public static java.lang.String decode(java.lang.String encoded)
Decode an URL formatted string.
Parameters:
s - The string to decode.
Returns:
The decoded string.

handleGetProperty

public static java.lang.Object handleGetProperty(java.lang.Object o,
                                                 java.lang.String prop)
                                          throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     java.lang.Object value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     int value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     short value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     long value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     double value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     float value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     char value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     byte value)
                              throws JasperException

handleSetProperty

public static void handleSetProperty(java.lang.Object bean,
                                     java.lang.String prop,
                                     boolean value)
                              throws JasperException

getWriteMethod

public static java.lang.reflect.Method getWriteMethod(java.lang.Class beanClass,
                                                      java.lang.String prop)
                                               throws JasperException

getReadMethod

public static java.lang.reflect.Method getReadMethod(java.lang.Class beanClass,
                                                     java.lang.String prop)
                                              throws JasperException

JSPTemplates