KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > jsp > AnalyzedTag


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Scott Ferguson
27  */

28
29 package com.caucho.jsp;
30
31 import com.caucho.log.Log;
32 import com.caucho.util.L10N;
33
34 import java.util.logging.Logger JavaDoc;
35
36 /**
37  * Stores analyzed information about a tag.
38  */

39 public class AnalyzedTag {
40   private static final Logger JavaDoc log = Log.open(AnalyzedTag.class);
41   static final L10N L = new L10N(AnalyzedTag.class);
42
43   private boolean _isBodyTag;
44   
45   private boolean _doStart;
46   private boolean _startReturnsSkip;
47   private boolean _startReturnsInclude;
48   private boolean _startReturnsBuffered;
49   
50   private boolean _doEnd;
51   private boolean _endReturnsSkip;
52   private boolean _endReturnsEval;
53
54   private boolean _doAfter;
55   private boolean _afterReturnsAgain;
56   
57   private boolean _doInit;
58
59   private boolean _doCatch;
60   private boolean _doFinally;
61
62   private boolean _hasInjection;
63
64   /**
65    * Set true for a body tag.
66    */

67   public void setBodyTag(boolean isBodyTag)
68   {
69     _isBodyTag = isBodyTag;
70   }
71
72   /**
73    * Set true for a body tag.
74    */

75   public boolean isBodyTag()
76   {
77     return _isBodyTag;
78   }
79
80   /**
81    * Set true if the tag implements doStart.
82    */

83   public boolean getDoStart()
84   {
85     return _doStart;
86   }
87
88   /**
89    * Set true if the tag implements doStart.
90    */

91   public void setDoStart(boolean doStart)
92   {
93     _doStart = doStart;
94   }
95
96   /**
97    * Set true if the doStart can return SKIP_BODY
98    */

99   public boolean getStartReturnsSkip()
100   {
101     return _startReturnsSkip;
102   }
103
104   /**
105    * Set true if the doStart can return SKIP_BODY
106    */

107   public void setStartReturnsSkip(boolean skip)
108   {
109     _startReturnsSkip = skip;
110   }
111
112   /**
113    * Set true if the doStart can return INCLUDE_BODY
114    */

115   public boolean getStartReturnsInclude()
116   {
117     return _startReturnsInclude;
118   }
119
120   /**
121    * Set true if the doStart can return INCLUDE_BODY
122    */

123   public void setStartReturnsInclude(boolean include)
124   {
125     _startReturnsInclude = include;
126   }
127
128   /**
129    * Set true if the doStart can return INCLUDE_BODY_BUFFERED
130    */

131   public boolean getStartReturnsBuffered()
132   {
133     return _isBodyTag && _startReturnsBuffered;
134   }
135
136   /**
137    * Set true if the doStart can return INCLUDE_BODY_BUFFERED
138    */

139   public boolean getStartReturnsBufferedAsParent()
140   {
141     return _startReturnsBuffered;
142   }
143
144   /**
145    * Set true if the doStart can return INCLUDE_BODY_BUFFERED
146    */

147   public void setStartReturnsBuffered(boolean buffered)
148   {
149     _startReturnsBuffered = buffered;
150   }
151
152   /**
153    * Set true if the tag implements doEndTag.
154    */

155   public boolean getDoEnd()
156   {
157     return _doEnd;
158   }
159
160   /**
161    * Set true if the tag implements doEndTag.
162    */

163   public void setDoEnd(boolean doEnd)
164   {
165     _doEnd = doEnd;
166   }
167
168   /**
169    * Set true if the doEndTag can return SKIP_PAGE
170    */

171   public boolean getEndReturnsSkip()
172   {
173     return _endReturnsSkip;
174   }
175
176   /**
177    * Set true if the doEndTag can return SKIP_PAGE
178    */

179   public void setEndReturnsSkip(boolean skip)
180   {
181     _endReturnsSkip = skip;
182   }
183
184   /**
185    * Set true if the doEndTag can return EVAL_PAGE
186    */

187   public boolean getEndReturnsEval()
188   {
189     return _endReturnsEval;
190   }
191
192   /**
193    * Set true if the doEndTag can return EVAL_PAGE
194    */

195   public void setEndReturnsEval(boolean eval)
196   {
197     _endReturnsEval = eval;
198   }
199
200   /**
201    * Set true if the tag implements doAfterBody
202    */

203   public boolean getDoAfter()
204   {
205     return _doAfter;
206   }
207
208   /**
209    * Set true if the tag implements doAfterBody
210    */

211   public void setDoAfter(boolean doAfter)
212   {
213     _doAfter = doAfter;
214   }
215
216   /**
217    * Set true if the doAfterBody can return EVAL_BODY_AGAIN
218    */

219   public boolean getAfterReturnsAgain()
220   {
221     return _afterReturnsAgain;
222   }
223
224   /**
225    * Set true if the doAfterBody can return EVAL_BODY_AGAIN
226    */

227   public void setAfterReturnsAgain(boolean again)
228   {
229     _afterReturnsAgain = again;
230   }
231
232   /**
233    * Set true if the tag implements doInitBody.
234    */

235   public boolean getDoInit()
236   {
237     return _doInit;
238   }
239
240   /**
241    * Set true if the tag implements doInitBody.
242    */

243   public void setDoInit(boolean doInit)
244   {
245     _doInit = doInit;
246   }
247
248   /**
249    * Set true if the tag implements doCatch
250    */

251   public boolean getDoCatch()
252   {
253     return _doCatch;
254   }
255
256   /**
257    * Set true if the tag implements doCatch
258    */

259   public void setDoCatch(boolean doCatch)
260   {
261     _doCatch = doCatch;
262   }
263
264   /**
265    * Set true if the tag implements doFinally
266    */

267   public boolean getDoFinally()
268   {
269     return _doFinally;
270   }
271
272   /**
273    * Set true if the tag implements doFinally
274    */

275   public void setDoFinally(boolean doFinally)
276   {
277     _doFinally = doFinally;
278   }
279
280   /**
281    * True if the tag has a @Resource.
282    */

283   public boolean getHasInjection()
284   {
285     return _hasInjection;
286   }
287
288   /**
289    * True if the tag has a @Resource.
290    */

291   public void setHasInjection(boolean hasInjection)
292   {
293     _hasInjection = hasInjection;
294   }
295 }
296
Popular Tags