Java Doc for JspUtil.java in  » Sevlet-Container » tomcat-jasper2 » org » apache » jasper » compiler » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » tomcat jasper2 » org.apache.jasper.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.jasper.compiler.JspUtil

JspUtil
public class JspUtil (Code)
This class has all the utility method(s). Ideally should move all the bean containers here.
author:
   Mandar Raje.
author:
   Rajiv Mordani.
author:
   Danno Ferrin
author:
   Pierre Delisle
author:
   Shawn Bayern
author:
   Mark Roth

Inner Class :public static class ValidAttribute

Field Summary
final public static  intCHUNKSIZE
    


Method Summary
public static  booleanbooleanValue(String s)
     Convert a String value to 'boolean'. Besides the standard conversions done by Boolean.valueOf(s).booleanValue(), the value "yes" (ignore case) is also converted to 'true'.
public static  voidcheckAttributes(String typeOfTag, Node n, ValidAttribute[] validAttributes, ErrorDispatcher err)
     Checks if all mandatory attributes are present and if all attributes present have valid names.
public static  voidcheckScope(String scope, Node n, ErrorDispatcher err)
     Checks to see if the given scope is valid.
public static  StringcoerceToBoolean(String s, boolean isNamedAttribute)
    
public static  StringcoerceToByte(String s, boolean isNamedAttribute)
    
public static  StringcoerceToChar(String s, boolean isNamedAttribute)
    
public static  StringcoerceToCharacter(String s, boolean isNamedAttribute)
    
public static  StringcoerceToDouble(String s, boolean isNamedAttribute)
    
public static  StringcoerceToFloat(String s, boolean isNamedAttribute)
    
public static  StringcoerceToInt(String s, boolean isNamedAttribute)
    
public static  StringcoerceToInteger(String s, boolean isNamedAttribute)
    
public static  StringcoerceToLong(String s, boolean isNamedAttribute)
    
public static  StringcoerceToPrimitiveBoolean(String s, boolean isNamedAttribute)
    
public static  StringcoerceToPrimitiveByte(String s, boolean isNamedAttribute)
    
public static  StringcoerceToPrimitiveDouble(String s, boolean isNamedAttribute)
    
public static  StringcoerceToPrimitiveFloat(String s, boolean isNamedAttribute)
    
public static  StringcoerceToPrimitiveLong(String s, boolean isNamedAttribute)
    
public static  StringcoerceToPrimitiveShort(String s, boolean isNamedAttribute)
    
public static  StringcoerceToShort(String s, boolean isNamedAttribute)
    
public static  StringescapeQueryString(String unescString)
    
public static  char[]escapeQuotes(char[] chars)
    
public static  StringescapeXml(String s)
     Escape the 5 entities defined by XML.
public static  StringgetCanonicalName(Class c)
     Compute the canonical name from a Class instance.
public static  StringgetExpr(String expression, boolean isXml)
    
public static  StringgetExprInXml(String expression)
    
public static  InputStreamgetInputStream(String fname, JarFile jarFile, JspCompilationContext ctxt, ErrorDispatcher err)
    
static  InputStreamReadergetReader(String fname, String encoding, JarFile jarFile, JspCompilationContext ctxt, ErrorDispatcher err)
    
public static  StringgetTagHandlerClassName(String path, ErrorDispatcher err)
     Gets the fully-qualified class name of the tag handler corresponding to the given tag file path.
public static  StringinterpreterCall(boolean isTagFile, String expression, Class expectedType, String fnmapvar, boolean XmlEscape)
     Produces a String representing a call to the EL interpreter.
public static  booleanisExpression(String token, boolean isXml)
     Checks if the token is a runtime expression. In standard JSP syntax, a runtime expression starts with '<%' and ends with '%>'.
public static  booleanisJavaKeyword(String key)
    
final public static  StringmakeJavaIdentifier(String identifier)
    
final public static  StringmakeJavaPackage(String path)
    
final public static  StringmakeXmlJavaIdentifier(String name)
     Converts the given Xml name to a legal Java identifier.
final public static  StringmangleChar(char ch)
     Mangle the specified character to create a legal Java class name.
public static  StringnextTemporaryVariableName()
     Generates a new temporary variable name.
public static  char[]removeQuotes(char[] chars)
    
public static  Stringreplace(String name, char replace, String with)
     Replaces any occurrences of the character replace with the string with.
public static  voidresetTemporaryVariableName()
     Resets the temporary variable name.
public static  ClasstoClass(String type, ClassLoader loader)
     Returns the Class object associated with the class or interface with the given string name.
public static  StringtoJavaSourceType(String type)
     Class.getName() return arrays in the form "[[[", where et, the element type can be one of ZBCDFIJS or L; It is converted into forms that can be understood by javac.
public static  voidvalidateExpressions(Mark where, String expressions, Class expectedType, FunctionMapper functionMapper, ErrorDispatcher err)
     Validates the syntax of all ${} expressions within the given string.

Field Detail
CHUNKSIZE
final public static int CHUNKSIZE(Code)





Method Detail
booleanValue
public static boolean booleanValue(String s)(Code)
Convert a String value to 'boolean'. Besides the standard conversions done by Boolean.valueOf(s).booleanValue(), the value "yes" (ignore case) is also converted to 'true'. If 's' is null, then 'false' is returned.
Parameters:
  s - the string to be converted the boolean value associated with the string s



checkAttributes
public static void checkAttributes(String typeOfTag, Node n, ValidAttribute[] validAttributes, ErrorDispatcher err) throws JasperException(Code)
Checks if all mandatory attributes are present and if all attributes present have valid names. Checks attributes specified as XML-style attributes as well as attributes specified using the jsp:attribute standard action.



checkScope
public static void checkScope(String scope, Node n, ErrorDispatcher err) throws JasperException(Code)
Checks to see if the given scope is valid.
Parameters:
  scope - The scope to be checked
Parameters:
  n - The Node containing the 'scope' attribute whose value is to bechecked
Parameters:
  err - error dispatcher
throws:
  JasperException - if scope is not null and different from"page", "request", "session", and"application"



coerceToBoolean
public static String coerceToBoolean(String s, boolean isNamedAttribute)(Code)



coerceToByte
public static String coerceToByte(String s, boolean isNamedAttribute)(Code)



coerceToChar
public static String coerceToChar(String s, boolean isNamedAttribute)(Code)



coerceToCharacter
public static String coerceToCharacter(String s, boolean isNamedAttribute)(Code)



coerceToDouble
public static String coerceToDouble(String s, boolean isNamedAttribute)(Code)



coerceToFloat
public static String coerceToFloat(String s, boolean isNamedAttribute)(Code)



coerceToInt
public static String coerceToInt(String s, boolean isNamedAttribute)(Code)



coerceToInteger
public static String coerceToInteger(String s, boolean isNamedAttribute)(Code)



coerceToLong
public static String coerceToLong(String s, boolean isNamedAttribute)(Code)



coerceToPrimitiveBoolean
public static String coerceToPrimitiveBoolean(String s, boolean isNamedAttribute)(Code)



coerceToPrimitiveByte
public static String coerceToPrimitiveByte(String s, boolean isNamedAttribute)(Code)



coerceToPrimitiveDouble
public static String coerceToPrimitiveDouble(String s, boolean isNamedAttribute)(Code)



coerceToPrimitiveFloat
public static String coerceToPrimitiveFloat(String s, boolean isNamedAttribute)(Code)



coerceToPrimitiveLong
public static String coerceToPrimitiveLong(String s, boolean isNamedAttribute)(Code)



coerceToPrimitiveShort
public static String coerceToPrimitiveShort(String s, boolean isNamedAttribute)(Code)



coerceToShort
public static String coerceToShort(String s, boolean isNamedAttribute)(Code)



escapeQueryString
public static String escapeQueryString(String unescString)(Code)



escapeQuotes
public static char[] escapeQuotes(char[] chars)(Code)



escapeXml
public static String escapeXml(String s)(Code)
Escape the 5 entities defined by XML.



getCanonicalName
public static String getCanonicalName(Class c)(Code)
Compute the canonical name from a Class instance. Note that a simple replacment of '$' with '.' of a binary name would not work, as '$' is a legal Java Identifier character.
Parameters:
  c - A instance of java.lang.Class The canonical name of c.



getExpr
public static String getExpr(String expression, boolean isXml)(Code)
the "expression" part of a runtime expression, taking the delimiters out.



getExprInXml
public static String getExprInXml(String expression)(Code)
Takes a potential expression and converts it into XML form



getInputStream
public static InputStream getInputStream(String fname, JarFile jarFile, JspCompilationContext ctxt, ErrorDispatcher err) throws JasperException, IOException(Code)



getReader
static InputStreamReader getReader(String fname, String encoding, JarFile jarFile, JspCompilationContext ctxt, ErrorDispatcher err) throws JasperException, IOException(Code)



getTagHandlerClassName
public static String getTagHandlerClassName(String path, ErrorDispatcher err) throws JasperException(Code)
Gets the fully-qualified class name of the tag handler corresponding to the given tag file path.
Parameters:
  path - Tag file path
Parameters:
  err - Error dispatcher Fully-qualified class name of the tag handler corresponding to the given tag file path



interpreterCall
public static String interpreterCall(boolean isTagFile, String expression, Class expectedType, String fnmapvar, boolean XmlEscape)(Code)
Produces a String representing a call to the EL interpreter.
Parameters:
  expression - a String containing zero or more "${}" expressions
Parameters:
  expectedType - the expected type of the interpreted result
Parameters:
  fnmapvar - Variable pointing to a function map.
Parameters:
  XmlEscape - True if the result should do XML escaping a String representing a call to the EL interpreter.



isExpression
public static boolean isExpression(String token, boolean isXml)(Code)
Checks if the token is a runtime expression. In standard JSP syntax, a runtime expression starts with '<%' and ends with '%>'. When the JSP document is in XML syntax, a runtime expression starts with '%=' and ends with '%'.
Parameters:
  token - The token to be checkedreturn whether the token is a runtime expression or not.



isJavaKeyword
public static boolean isJavaKeyword(String key)(Code)
Test whether the argument is a Java keyword



makeJavaIdentifier
final public static String makeJavaIdentifier(String identifier)(Code)
Converts the given identifier to a legal Java identifier
Parameters:
  identifier - Identifier to convert Legal Java identifier corresponding to the given identifier



makeJavaPackage
final public static String makeJavaPackage(String path)(Code)
Converts the given path to a Java package or fully-qualified class name
Parameters:
  path - Path to convert Java package corresponding to the given path



makeXmlJavaIdentifier
final public static String makeXmlJavaIdentifier(String name)(Code)
Converts the given Xml name to a legal Java identifier. This is slightly more efficient than makeJavaIdentifier in that we only need to worry about '.', '-', and ':' in the string. We also assume that the resultant string is further concatenated with some prefix string so that we don't have to worry about it being a Java key word.
Parameters:
  name - Identifier to convert Legal Java identifier corresponding to the given identifier



mangleChar
final public static String mangleChar(char ch)(Code)
Mangle the specified character to create a legal Java class name.



nextTemporaryVariableName
public static String nextTemporaryVariableName()(Code)
Generates a new temporary variable name. (not thread-safe)



removeQuotes
public static char[] removeQuotes(char[] chars)(Code)



replace
public static String replace(String name, char replace, String with)(Code)
Replaces any occurrences of the character replace with the string with.



resetTemporaryVariableName
public static void resetTemporaryVariableName()(Code)
Resets the temporary variable name. (not thread-safe)



toClass
public static Class toClass(String type, ClassLoader loader) throws ClassNotFoundException(Code)
Returns the Class object associated with the class or interface with the given string name.

The Class object is determined by passing the given string name to the Class.forName() method, unless the given string name represents a primitive type, in which case it is converted to a Class object by appending ".class" to it (e.g., "int.class").




toJavaSourceType
public static String toJavaSourceType(String type)(Code)
Class.getName() return arrays in the form "[[[", where et, the element type can be one of ZBCDFIJS or L; It is converted into forms that can be understood by javac.



validateExpressions
public static void validateExpressions(Mark where, String expressions, Class expectedType, FunctionMapper functionMapper, ErrorDispatcher err) throws JasperException(Code)
Validates the syntax of all ${} expressions within the given string.
Parameters:
  where - the approximate location of the expressions in the JSP page
Parameters:
  expressions - a string containing zero or more "${}" expressions
Parameters:
  err - an error dispatcher to use



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.