KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jasper > compiler > GetParseData


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.apache.jasper.compiler;
21
22 import java.io.*;
23 import java.lang.reflect.Field JavaDoc;
24 import java.net.URI JavaDoc;
25 import java.net.URL JavaDoc;
26 import java.util.*;
27 import javax.servlet.jsp.*;
28 import javax.servlet.jsp.tagext.*;
29 import javax.xml.parsers.*;
30 import org.apache.jasper.*;
31 import org.openide.ErrorManager;
32
33
34 /**
35  *
36  * @author Petr Jiricka
37  */

38 public class GetParseData {
39
40     protected JspCompilationContext ctxt;
41
42     protected Options options;
43     private CompilerHacks compHacks;
44     private int errorReportingMode;
45
46     private org.netbeans.modules.web.jsps.parserapi.Node.Nodes nbNodes;
47     private org.netbeans.modules.web.jsps.parserapi.PageInfo nbPageInfo;
48     private Throwable JavaDoc parseException;
49     
50   
51     /** Creates a new instance of ExtractPageData */
52     public GetParseData(JspCompilationContext ctxt, int errorReportingMode) {
53         this.ctxt = ctxt;
54         this.errorReportingMode = errorReportingMode;
55         this.options = ctxt.getOptions();
56         this.compHacks = new CompilerHacks(ctxt);
57     }
58     
59     public org.netbeans.modules.web.jsps.parserapi.Node.Nodes getNbNodes() {
60         return nbNodes;
61     }
62
63     public org.netbeans.modules.web.jsps.parserapi.PageInfo getNbPageInfo() {
64         return nbPageInfo;
65     }
66     
67     public Throwable JavaDoc getParseException() {
68         return parseException;
69     }
70
71     /** Code in this method copied over and adapted from Compiler.generateJava()
72      **/

73     public void parse() {
74         Node.Nodes pageNodes = null;
75         PageInfo pageInfo = null;
76         String JavaDoc xmlView = null;
77         try {
78             //String smapStr = null;
79

80             // long t1=System.currentTimeMillis();
81

82             // Setup page info area
83
Compiler JavaDoc comp = compHacks.getCompiler();
84             pageInfo = comp.getPageInfo();
85             ErrorDispatcher errDispatcher = comp.getErrorDispatcher();
86
87
88             // pageInfo = new PageInfo(new BeanRepository(ctxt.getClassLoader(),
89
// errDispatcher));
90

91             JspConfig jspConfig = options.getJspConfig();
92             JspConfig.JspProperty jspProperty =
93                             jspConfig.findJspProperty(ctxt.getJspFile());
94
95             /*
96              * If the current uri is matched by a pattern specified in
97              * a jsp-property-group in web.xml, initialize pageInfo with
98              * those properties.
99              */

100             pageInfo.setELIgnored(JspUtil.booleanValue(jspProperty.isELIgnored()));
101             pageInfo.setScriptingInvalid(JspUtil.booleanValue(jspProperty.isScriptingInvalid()));
102             if (jspProperty.getIncludePrelude() != null) {
103                 pageInfo.setIncludePrelude(jspProperty.getIncludePrelude());
104             }
105             if (jspProperty.getIncludeCoda() != null) {
106                 pageInfo.setIncludeCoda(jspProperty.getIncludeCoda());
107             }
108             // String javaFileName = ctxt.getServletJavaFileName();
109

110             // Setup the ServletWriter
111
// String javaEncoding = ctxt.getOptions().getJavaEncoding();
112
// OutputStreamWriter osw = null;
113
// try {
114
// osw = new OutputStreamWriter(new FileOutputStream(javaFileName),
115
// javaEncoding);
116
// } catch (UnsupportedEncodingException ex) {
117
// errDispatcher.jspError("jsp.error.needAlternateJavaEncoding", javaEncoding);
118
// }
119

120             // ServletWriter writer = new ServletWriter(new PrintWriter(osw));
121
// ctxt.setWriter(writer);
122

123             // Reset the temporary variable counter for the generator.
124
JspUtil.resetTemporaryVariableName();
125
126             // Parse the file
127
ParserController parserCtl = new ParserController(ctxt, comp);
128             pageNodes = parserCtl.parse(ctxt.getJspFile());
129
130             // if (ctxt.isPrototypeMode()) {
131
// // generate prototype .java file for the tag file
132
// Generator.generate(writer, this, pageNodes);
133
// writer.close();
134
// return null;
135
// }
136

137             // Generate FunctionMapper (used for validation of EL expressions and
138
// code generation)
139
// pageInfo.setFunctionMapper(new FunctionMapperImpl(this));
140

141             // Validate and process attributes
142
// Validator.validate(comp, pageNodes);
143
xmlView = NbValidator.validate(comp, pageNodes);
144
145             // long t2=System.currentTimeMillis();
146
// Dump out the page (for debugging)
147
// Dumper.dump(pageNodes);
148

149             // Collect page info
150
Collector.collect(comp, pageNodes);
151
152             // Compile (if necessary) and load the tag files referenced in
153
// this compilation unit.
154

155             // PENDING - we may need to process tag files somehow
156
// TagFileProcessor tfp = new TagFileProcessor();
157
// tfp.loadTagFiles(comp, pageNodes);
158

159             // long t3=System.currentTimeMillis();
160

161             // Determine which custom tag needs to declare which scripting vars
162
ScriptingVariabler.set(pageNodes, errDispatcher);
163
164             // Optimizations by Tag Plugins
165
TagPluginManager tagPluginManager = options.getTagPluginManager();
166             tagPluginManager.apply(pageNodes, errDispatcher, pageInfo);
167
168             // Generate static funciton mapper codes.
169
ELFunctionMapper.map(comp, pageNodes);
170
171             // generate servlet .java file
172
// Generator.generate(writer, comp, pageNodes);
173
// writer.close();
174
// The writer is only used during the compile, dereference
175
// it in the JspCompilationContext when done to allow it
176
// to be GC'd and save memory.
177
// ctxt.setWriter(null);
178

179             // long t4=System.currentTimeMillis();
180
// if( t4-t1 > 500 ) {
181
// log.debug("Generated "+ javaFileName + " total=" +
182
// (t4-t1) + " generate=" + ( t4-t3 ) + " validate=" + ( t2-t1 ));
183
// }
184

185                     //JSR45 Support - note this needs to be checked by a JSR45 guru
186
// if (! options.isSmapSuppressed()) {
187
// String smapStr = SmapUtil.generateSmap(ctxt, pageNodes);
188
// }
189

190             // If any proto type .java and .class files was generated,
191
// the prototype .java may have been replaced by the current
192
// compilation (if the tag file is self referencing), but the
193
// .class file need to be removed, to make sure that javac would
194
// generate .class again from the new .java file just generated.
195

196             // PENDING - we may need to process tag files somehow
197
// tfp.removeProtoTypeFiles(ctxt.getClassFileName());
198
}
199         catch (ThreadDeath JavaDoc t) {
200             throw t;
201         }
202         catch (Throwable JavaDoc t) {
203             parseException = t;
204         }
205         finally {
206             // convert the nodes
207
try {
208                 if (pageNodes != null) {
209                     nbNodes = convertNodes(pageNodes);
210                 }
211             }
212             catch (JasperException e) {
213                 if (parseException == null) {
214                     parseException = e;
215                 }
216             }
217             // convert the pageInfo
218
try {
219                 if (pageInfo != null) {
220                     // xmlView may be null
221
nbPageInfo = convertPageInfo(pageInfo, xmlView, ctxt);
222                 }
223             }
224             catch (JspException e) {
225                 if (parseException == null) {
226                     parseException = e;
227                 }
228             }
229         }
230 // return smapStr;
231
}
232     
233     
234     private static org.netbeans.modules.web.jsps.parserapi.Node.Nodes convertNodes(Node.Nodes nodes) throws JasperException {
235         org.netbeans.modules.web.jsps.parserapi.Node.Nodes nbNodes =
236         NodeConverterVisitor.convertNodes(nodes);
237         return nbNodes;
238     }
239     
240     private static org.netbeans.modules.web.jsps.parserapi.PageInfo convertPageInfo(PageInfo pageInfo, String JavaDoc xmlView, JspCompilationContext ctxt) throws JspException {
241         PageInfoImpl nbPageInfo =
242             new PageInfoImpl(
243                 getTaglibsMapReflect(pageInfo, ctxt),
244                 getJSPPrefixMapperReflect(pageInfo),
245                 getXMLPrefixMapperReflect(pageInfo),
246                 ((CompilerHacks.HackPageInfo)pageInfo).getApproxXmlPrefixMapper(),
247                 pageInfo.getImports(),
248                 pageInfo.getDependants(),
249                 pageInfo.getIncludePrelude(),
250                 pageInfo.getIncludeCoda(),
251                 getPluginDclsReflect(pageInfo),
252                 getPrefixesReflect(pageInfo)
253             );
254         nbPageInfo.setLanguage( pageInfo.getLanguage());
255         nbPageInfo.setExtends( pageInfo.getExtends());
256         nbPageInfo.setContentType( pageInfo.getContentType());
257         nbPageInfo.setSession( pageInfo.getSession());
258         nbPageInfo.setBufferValue( pageInfo.getBufferValue());
259         nbPageInfo.setAutoFlush( pageInfo.getAutoFlush());
260         nbPageInfo.setIsThreadSafe( pageInfo.getIsThreadSafe());
261         nbPageInfo.setIsErrorPage( pageInfo.getIsErrorPage());
262         nbPageInfo.setErrorPage( pageInfo.getErrorPage());
263         nbPageInfo.setScriptless( pageInfo.isScriptless());
264         nbPageInfo.setScriptingInvalid( pageInfo.isScriptingInvalid());
265         nbPageInfo.setELIgnored( pageInfo.isELIgnored());
266         nbPageInfo.setOmitXmlDecl( pageInfo.getOmitXmlDecl());
267         nbPageInfo.setIsJspPrefixHijacked( pageInfo.isJspPrefixHijacked());
268         nbPageInfo.setDoctypeName( pageInfo.getDoctypeName());
269         nbPageInfo.setDoctypeSystem( pageInfo.getDoctypeSystem());
270         nbPageInfo.setDoctypePublic( pageInfo.getDoctypePublic());
271         nbPageInfo.setHasJspRoot( pageInfo.hasJspRoot());
272         nbPageInfo.setBeans(createBeanData(pageInfo.getBeanRepository()));
273         // the xml view
274
nbPageInfo.setXMLView(xmlView);
275         
276         return nbPageInfo;
277     }
278     
279     
280     private static org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData[] createBeanData(BeanRepository rep) {
281         try {
282             initBeanRepositoryFields();
283             Vector sessionBeans = (Vector)sessionBeansF.get(rep);
284             Vector pageBeans = (Vector)pageBeansF.get(rep);
285             Vector appBeans = (Vector)appBeansF.get(rep);
286             Vector requestBeans = (Vector)requestBeansF.get(rep);
287             Hashtable beanTypes = (Hashtable)beanTypesF.get(rep);
288             int size = beanTypes.size();
289             org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData bd[] =
290                 new org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData[size];
291             Iterator it = beanTypes.keySet().iterator();
292             int index = 0;
293             while (it.hasNext()) {
294                 String JavaDoc id = (String JavaDoc)it.next();
295                 String JavaDoc type = (String JavaDoc)beanTypes.get(id);
296                 int scope = PageContext.PAGE_SCOPE;
297                 if (sessionBeans.contains(id)) {
298                     scope = PageContext.SESSION_SCOPE;
299                 }
300                 if (appBeans.contains(id)) {
301                     scope = PageContext.APPLICATION_SCOPE;
302                 }
303                 if (requestBeans.contains(id)) {
304                     scope = PageContext.REQUEST_SCOPE;
305                 }
306                 
307                 bd[index] = new BeanDataImpl(id, scope, type);
308                 ++index;
309             }
310             return bd;
311         }
312         catch (IllegalAccessException JavaDoc e) {
313             ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
314             throw new RuntimeException JavaDoc();
315         }
316     }
317     
318     static class PageInfoImpl extends org.netbeans.modules.web.jsps.parserapi.PageInfo {
319         
320         public PageInfoImpl(/*BeanRepository beanRepository*/
321                 Map taglibsMap,
322                 Map jspPrefixMapper,
323                 Map xmlPrefixMapper,
324                 Map approxXmlPrefixMapper,
325                 List imports,
326                 List dependants,
327                 List includePrelude,
328                 List includeCoda,
329                 List pluginDcls,
330                 Set prefixes
331             ) {
332             super(taglibsMap, jspPrefixMapper, xmlPrefixMapper, approxXmlPrefixMapper, imports, dependants, includePrelude,
333                 includeCoda, pluginDcls, prefixes);
334         }
335         
336         private String JavaDoc xmlView;
337         
338         public void setXMLView(String JavaDoc xmlView) {
339             this.xmlView = xmlView;
340         }
341         
342         public String JavaDoc getXMLView() {
343             return xmlView;
344         }
345         
346         public String JavaDoc toString() {
347             StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
348             sb.append(super.toString());
349             sb.append(" ------- XML View (constructed from the original data structure) -----\n");
350             if (xmlView == null) {
351                 sb.append("no XML view\n");
352             }
353             else {
354                 sb.append(getXMLView());
355             }
356             return sb.toString();
357         }
358         
359     }
360     
361     static class BeanDataImpl implements org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData {
362
363         private String JavaDoc id;
364         private int scope;
365         private String JavaDoc className;
366
367         BeanDataImpl(String JavaDoc id, int scope, String JavaDoc className) {
368             this.id = id;
369             this.scope = scope;
370             this.className = className;
371         }
372
373         /** Identifier of the bean in the page (variable name). */
374         public String JavaDoc getId() {
375             return id;
376         }
377
378         /** Scope for this bean. Returns constants defined in {@link javax.servlet.jsp.PageContext}. */
379         public int getScope() {
380             return scope;
381         }
382
383         /** Returns the class name for this bean. */
384         public String JavaDoc getClassName() {
385             return className;
386         }
387
388     }
389                 
390     // ------ getting BeanRepository data by reflection
391
private static Field JavaDoc sessionBeansF, pageBeansF, appBeansF, requestBeansF, beanTypesF;
392     
393     private static void initBeanRepositoryFields() {
394         if (sessionBeansF == null) {
395             try {
396                 sessionBeansF = BeanRepository.class.getDeclaredField("sessionBeans");
397                 sessionBeansF.setAccessible(true);
398                 pageBeansF = BeanRepository.class.getDeclaredField("pageBeans");
399                 pageBeansF.setAccessible(true);
400                 appBeansF = BeanRepository.class.getDeclaredField("appBeans");
401                 appBeansF.setAccessible(true);
402                 requestBeansF = BeanRepository.class.getDeclaredField("requestBeans");
403                 requestBeansF.setAccessible(true);
404                 beanTypesF = BeanRepository.class.getDeclaredField("beanTypes");
405                 beanTypesF.setAccessible(true);
406             }
407             catch (NoSuchFieldException JavaDoc e) {
408                 ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
409             }
410         }
411     }
412
413     
414     // ------ getting BeanRepository data by reflection
415
private static Field JavaDoc pluginDclsF, prefixesF, taglibsMapF, jspPrefixMapperF, xmlPrefixMapperF;
416     
417     private static void initPageInfoFields() {
418         if (pluginDclsF == null) {
419             try {
420                 pluginDclsF = PageInfo.class.getDeclaredField("pluginDcls");
421                 pluginDclsF.setAccessible(true);
422                 prefixesF = PageInfo.class.getDeclaredField("prefixes");
423                 prefixesF.setAccessible(true);
424                 taglibsMapF = PageInfo.class.getDeclaredField("taglibsMap");
425                 taglibsMapF.setAccessible(true);
426                 jspPrefixMapperF = PageInfo.class.getDeclaredField("jspPrefixMapper");
427                 jspPrefixMapperF.setAccessible(true);
428                 xmlPrefixMapperF = PageInfo.class.getDeclaredField("xmlPrefixMapper");
429                 xmlPrefixMapperF.setAccessible(true);
430             }
431             catch (NoSuchFieldException JavaDoc e) {
432                 ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
433             }
434         }
435     }
436     
437     private static Vector getPluginDclsReflect(PageInfo pageInfo) {
438         initPageInfoFields();
439         try {
440             return (Vector)pluginDclsF.get(pageInfo);
441         }
442         catch (IllegalAccessException JavaDoc e) {
443             ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
444             throw new RuntimeException JavaDoc();
445         }
446     }
447     
448     private static HashSet getPrefixesReflect(PageInfo pageInfo) {
449         initPageInfoFields();
450         try {
451             return (HashSet)prefixesF.get(pageInfo);
452         }
453         catch (IllegalAccessException JavaDoc e) {
454             ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
455             throw new RuntimeException JavaDoc();
456         }
457     }
458
459     private static class TagInfoCacheRecord{
460         long time;
461         TagInfo tagInfo;
462         
463         public TagInfoCacheRecord(long time, TagInfo info){
464             this.tagInfo = info;
465             this.time = time;
466         }
467     }
468     
469     /** The cache for the tag infos from tagfiles. There are stored TagInfoCacheRecord as value and
470      * the path for a tagfile as key. The informations are cached for the whole application.
471      * The cache is changed, when a jsp page is parsed and a tag file was changed.
472      */

473     
474     private static Hashtable tagInfoCache = new Hashtable();
475     
476     private static Map getTaglibsMapReflect(PageInfo pageInfo, JspCompilationContext ctxt) {
477         initPageInfoFields();
478         try {
479             Map taglibs = (Map)taglibsMapF.get(pageInfo);
480             Iterator iter = taglibs.values().iterator();
481             TagLibraryInfo libInfo;
482             TagInfo [] tagInfos;
483             // Caching information about tag files
484
while (iter.hasNext()){
485                 libInfo = (TagLibraryInfo)iter.next();
486                 tagInfos = null;
487                 try {
488                     ArrayList tags = new ArrayList();
489                     if (libInfo instanceof ImplicitTagLibraryInfo){
490                         //We need the access for the files
491
Field JavaDoc tagFileMapF = ImplicitTagLibraryInfo.class.getDeclaredField("tagFileMap");
492                         tagFileMapF.setAccessible(true);
493                         Hashtable tagFileMap = (Hashtable)tagFileMapF.get(libInfo);
494                         //Check every file in tag library
495
Enumeration e = tagFileMap.keys();
496                         
497                         while (e.hasMoreElements()){
498                             //Find the path for the file
499
String JavaDoc name = (String JavaDoc) e.nextElement();
500                             String JavaDoc filePath = (String JavaDoc)tagFileMap.get(name);
501                             
502                             URL JavaDoc path = ctxt.getResource(filePath);
503                             File file = new File (new URI JavaDoc( path.toExternalForm() ));
504                             // Is there the file in the cache?
505
if (tagInfoCache.containsKey(path)){
506                                 TagInfoCacheRecord r = (TagInfoCacheRecord)tagInfoCache.get(path);
507                                 // Is there a change in the tagfile?
508
if (r.time < file.lastModified()){
509                                     tagInfoCache.put(path, new TagInfoCacheRecord (file.lastModified(), libInfo.getTagFile(name).getTagInfo()));
510                                 }
511                             }
512                             else {
513                                 tagInfoCache.put(path, new TagInfoCacheRecord (file.lastModified(), libInfo.getTagFile(name).getTagInfo()));
514                             }
515                             //Obtain information from the cache
516
tags.add(((TagInfoCacheRecord)tagInfoCache.get(path)).tagInfo);
517                             tagInfos = new TagInfo[tags.size()];
518                             for (int i = 0; i < tags.size(); i++){
519                                 tagInfos[i] = (TagInfo)tags.get(i);
520                             }
521                         }
522                     }
523                     else {
524                         TagFileInfo[] tagFiles = libInfo.getTagFiles();
525                         if (tagFiles != null && tagFiles.length > 0){
526                             tagInfos = new TagInfo[tagFiles.length + libInfo.getTags().length];
527                             for (int i = 0; i < tagFiles.length; i++){
528                                 // Is it tag file from jar or form WEB-INF/tags
529
// fix for issue #56810
530
String JavaDoc[] location = ctxt.getTldLocation(libInfo.getURI());
531                                 if (location != null){
532                                     String JavaDoc path = location[0];
533                                     File file = new File (path);
534                                     path = path + tagFiles[i].getPath();
535                                     // Is there the file in the cache?
536
if (tagInfoCache.containsKey(path)){
537                                         TagInfoCacheRecord r = (TagInfoCacheRecord)tagInfoCache.get(path);
538                                         // Is there a change in the tagfile?
539
if (r.time < file.lastModified()){
540                                             tagInfoCache.put(path, new TagInfoCacheRecord (file.lastModified(),
541                                                 libInfo.getTagFile(tagFiles[i].getName()).getTagInfo()));
542                                         }
543                                     }
544                                     else {
545                                         tagInfoCache.put(path,
546                                             new TagInfoCacheRecord (file.lastModified(),
547                                             libInfo.getTagFile(tagFiles[i].getName()).getTagInfo()));
548                                     }
549                                     //Obtain information from the cache
550
tagInfos[i] = ((TagInfoCacheRecord)tagInfoCache.get(path)).tagInfo;
551                                 }
552                                 else
553                                     tagInfos[i] = libInfo.getTagFile(tagFiles[i].getName()).getTagInfo();
554                             }
555                             // add tags (created from tag handlers, if there are any one
556
for (int i = 0 ; i < libInfo.getTags().length; i++){
557                                 tagInfos[tagFiles.length + i] = libInfo.getTags()[i];
558                             }
559                         }
560                     }
561                     
562                     if (tagInfos != null && tagInfos.length > 0){
563                         // Setting the taginfos directly to the library.
564
Field JavaDoc tagInfosF = ImplicitTagLibraryInfo.class.getSuperclass().getDeclaredField("tags");
565                         tagInfosF.setAccessible(true);
566                         tagInfosF.set(libInfo, tagInfos);
567                     }
568                 }
569                 catch (java.lang.NoSuchFieldException JavaDoc e){
570                     ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
571                 }
572                 catch (java.net.MalformedURLException JavaDoc e){
573                     ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
574                 }
575                 catch (org.apache.jasper.JasperException e) {
576                     ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
577                 }
578                 catch (java.net.URISyntaxException JavaDoc e) {
579                     ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
580                 }
581             }
582             return taglibs;
583         }
584         catch (IllegalAccessException JavaDoc e) {
585             ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
586             throw new RuntimeException JavaDoc();
587         }
588     }
589     
590     private static Map getJSPPrefixMapperReflect(PageInfo pageInfo) {
591         initPageInfoFields();
592         try {
593             return (Map)jspPrefixMapperF.get(pageInfo);
594         }
595         catch (IllegalAccessException JavaDoc e) {
596             ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
597             throw new RuntimeException JavaDoc();
598         }
599     }
600     
601     private static Map getXMLPrefixMapperReflect(PageInfo pageInfo) {
602         initPageInfoFields();
603         try {
604             return (Map)xmlPrefixMapperF.get(pageInfo);
605         }
606         catch (IllegalAccessException JavaDoc e) {
607             ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
608             throw new RuntimeException JavaDoc();
609         }
610     }
611     
612 }
613
Popular Tags