|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
javax.servlet.jsp.tagext Class TagAttributeInfo
java.lang.Object javax.servlet.jsp.tagext.TagAttributeInfo
public class TagAttributeInfo
- extends Object
Information on the attributes of a Tag, available at translation time. This class is instantiated from the Tag Library Descriptor file (TLD).
Only the information needed to generate code is included here. Other information like SCHEMA for validation belongs elsewhere.
Note from the Expert Group:
This should have been designed as an interface. Every time we change the TLD,
we need to add a new constructor to this class (not good).
This class should only be instantiated by container implementations
(not by JSP developers).
字段摘要 | |
---|---|
static String |
ID
"id" is wired in to be ID. |
构造器摘要 | |
---|---|
TagAttributeInfo(String name,
boolean required,
String type,
boolean reqTime)
Constructor for TagAttributeInfo. |
|
TagAttributeInfo(String name,
boolean required,
String type,
boolean reqTime,
boolean fragment)
JSP 2.0 Constructor for TagAttributeInfo. |
|
TagAttributeInfo(String name,
boolean required,
String type,
boolean reqTime,
boolean fragment,
String description,
boolean deferredValue,
boolean deferredMethod,
String expectedTypeName,
String methodSignature)
JSP 2.1 Constructor for TagAttributeInfo. |
方法摘要 | |
---|---|
boolean |
canBeRequestTime()
Whether this attribute has been specified in the TLD as rtexprvalue. |
String |
getDescription()
Gets the description string of this tag attribute. |
String |
getExpectedTypeName()
Returns the name of the expected type (as a String) of this deferred value attribute. |
static TagAttributeInfo |
getIdAttribute(TagAttributeInfo[] a)
Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id". |
String |
getMethodSignature()
Returns the expected method signature of this deferred method attribute. |
String |
getName()
The name of this attribute. |
String |
getTypeName()
The type (as a String) of this attribute. |
boolean |
isDeferredMethod()
Returns true if this attribute is to be passed a
MethodExpression so that expression evaluation
can be deferred. |
boolean |
isDeferredValue()
Returns true if this attribute is to be passed a
ValueExpression so that expression evaluation
can be deferred. |
boolean |
isFragment()
Whether this attribute is of type JspFragment. |
boolean |
isRequired()
Whether this attribute is required. |
String |
toString()
Returns a String representation of this TagAttributeInfo, suitable for debugging purposes. |
类方法继承 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
字段详细信息 |
---|
ID
public static final String ID
- "id" is wired in to be ID. There is no real benefit in having it be something else
IDREFs are not handled any differently.
- 另请参见:
- 常量字段
构造器详细信息 |
---|
TagAttributeInfo
public TagAttributeInfo(String name, boolean required, String type, boolean reqTime)
- Constructor for TagAttributeInfo.
This class is to be instantiated only from the
TagLibrary code under request from some JSP code that is parsing a
TLD (Tag Library Descriptor).
- 参数:
name
- The name of the attribute.required
- If this attribute is required in tag instances.type
- The name of the type of the attribute.reqTime
- Whether this attribute holds a request-time Attribute.
TagAttributeInfo
public TagAttributeInfo(String name, boolean required, String type, boolean reqTime, boolean fragment)
- JSP 2.0 Constructor for TagAttributeInfo.
This class is to be instantiated only from the
TagLibrary code under request from some JSP code that is parsing a
TLD (Tag Library Descriptor).
- 参数:
name
- The name of the attribute.required
- If this attribute is required in tag instances.type
- The name of the type of the attribute.reqTime
- Whether this attribute holds a request-time Attribute.fragment
- Whether this attribute is of type JspFragment- 从以下版本开始:
- JSP 2.0
TagAttributeInfo
public TagAttributeInfo(String name, boolean required, String type, boolean reqTime, boolean fragment, String description, boolean deferredValue, boolean deferredMethod, String expectedTypeName, String methodSignature)
- JSP 2.1 Constructor for TagAttributeInfo.
This class is to be instantiated only from the
TagLibrary code under request from some JSP code that is parsing a
TLD (Tag Library Descriptor).
- 参数:
name
- The name of the attribute.required
- If this attribute is required in tag instances.type
- The name of the type of the attribute.reqTime
- Whether this attribute holds a request-time Attribute.fragment
- Whether this attribute is of type JspFragmentdescription
- The description of the attribute.deferredValue
- Whether this attribute is a deferred value.deferredMethod
- Whether this attribute is a deferred method. rtexpr or deferred value.expectedTypeName
- The name of the expected type of this deferred value (ornull
if this is not a deferred value).methodSignature
- The expected method signature of this deferred method (ornull
if this is not a deferred method).- 从以下版本开始:
- JSP 2.1
方法详细信息 |
---|
getName
public String getName()
- The name of this attribute.
- 返回:
- the name of the attribute
getTypeName
public String getTypeName()
- The type (as a String) of this attribute.
This method must return
"javax.el.ValueExpression"
ifisDeferredValue()
returnstrue
andcanBeRequestTime()
returnsfalse
. It must return"javax.el.MethodExpression"
ifisDeferredMethod()
returnstrue
. It must return"java.lang.Object"
ifisDeferredValue()
returnstrue
andcanBeRequestTime()
returnstrue
. - 返回:
- the type of the attribute
canBeRequestTime
public boolean canBeRequestTime()
- Whether this attribute has been specified in the TLD
as rtexprvalue. If
true
, this means the attribute can hold a request-time value. - 返回:
- true if the attribute has been specified in the TLD as rtexprvalue
isRequired
public boolean isRequired()
- Whether this attribute is required.
- 返回:
- if the attribute is required.
getIdAttribute
public static TagAttributeInfo getIdAttribute(TagAttributeInfo[] a)
- Convenience static method that goes through an array of TagAttributeInfo
objects and looks for "id".
- 参数:
a
- An array of TagAttributeInfo- 返回:
- The TagAttributeInfo reference with name "id"
isFragment
public boolean isFragment()
- Whether this attribute is of type JspFragment.
- 返回:
- if the attribute is of type JspFragment
- 从以下版本开始:
- JSP 2.0
getDescription
public String getDescription()
- Gets the description string of this tag attribute.
- 返回:
- the description string of this tag attribute
isDeferredValue
public boolean isDeferredValue()
- Returns
true
if this attribute is to be passed aValueExpression
so that expression evaluation can be deferred.If this method returns
true
, thengetTypeName()
must return"javax.el.ValueExpression"
.The
getExpectedType()
method can be used to retrieve the expected type this value expression will be constructed with. - 返回:
true
if this attribute accepts a deferred value;false
otherwise.- 从以下版本开始:
- JSP 2.1
isDeferredMethod
public boolean isDeferredMethod()
- Returns
true
if this attribute is to be passed aMethodExpression
so that expression evaluation can be deferred.If this method returns
true
, thengetTypeName()
must return"javax.el.MethodExpression"
.The
getMethodSignature()
method can be used to retrieve the expected method signature this method expression will be constructed with. - 返回:
true
if this attribute accepts a deferred method;false
otherwise.- 从以下版本开始:
- JSP 2.1
getExpectedTypeName
public String getExpectedTypeName()
- Returns the name of the expected type (as a String) of this
deferred value attribute.
This method returns
null
ifisDeferredValue()
returnsfalse
. - 返回:
- the name of the expected type
- 从以下版本开始:
- JSP 2.1
getMethodSignature
public String getMethodSignature()
- Returns the expected method signature of this deferred method attribute.
This method returns
null
ifisDeferredMethod()
returnsfalse
. - 返回:
- the method signature
- 从以下版本开始:
- JSP 2.1
toString
public String toString()
- Returns a String representation of this TagAttributeInfo, suitable
for debugging purposes.
- 返回:
- a String representation of this TagAttributeInfo
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.