|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.servlet.jsp.tagext Class TagAttributeInfo
java.lang.Object javax.servlet.jsp.tagext.TagAttributeInfo
public class TagAttributeInfo
- extends Object
有关 Tag 属性的信息,此类在转换期间可用。此类是根据标记库描述符文件 (TLD) 实例化的。
这里仅包含生成代码所需的信息。其他信息(比如用于验证的 SCHEMA)属于其他地方。
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).
Field Summary | |
---|---|
static String |
ID
"id" is wired in to be ID. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
英文文档:
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.
- See Also:
- Constant Field Values
Constructor Detail |
---|
public
TagAttributeInfo(String name, boolean required, String type, boolean reqTime)
TagAttributeInfo 的构造方法。此类只能通过某些解析 TLD (Tag Library Descriptor) 的 JSP 代码所请求的 TagLibrary 代码进行实例化。
name | 属性名称。 |
required | 标记实例是否需要此属性。 |
type | 属性类型的名称。 |
reqTime | 此属性是否包含请求期间属性。 |
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).
- Parameters:
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.
public
TagAttributeInfo(String name, boolean required, String type, boolean reqTime, boolean fragment)
TagAttributeInfo 的 JSP 2.0 构造方法。此类只能通过某些解析 TLD (Tag Library Descriptor) 的 JSP 代码所请求的 TagLibrary 代码进行实例化。
name | 属性名称。 |
required | 标记实例是否需要此属性。 |
type | 属性类型的名称。 |
reqTime | 此属性是否包含请求期间属性。 |
fragment | 此属性的类型是否为 JspFragment |
since | 2.0 |
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).
- Parameters:
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- Since:
- 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).
- Parameters:
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).- Since:
- JSP 2.1
Method Detail |
---|
public String
getName()
此属性的名称。
return | 属性的名称 |
getName
public String getName()
- The name of this attribute.
- Returns:
- the name of the attribute
public String
getTypeName()
此属性的类型(作为 String)。
return | 属性的类型 |
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
. - Returns:
- the type of the attribute
public boolean
canBeRequestTime()
此属性是否能包含请求期间值。
return | 属性是否能包含请求期间值。 |
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. - Returns:
- true if the attribute has been specified in the TLD as rtexprvalue
public boolean
isRequired()
此属性是否是必需的。
return | 属性是否是必需的。 |
isRequired
public boolean isRequired()
- Whether this attribute is required.
- Returns:
- if the attribute is required.
public static TagAttributeInfo
getIdAttribute(TagAttributeInfo[] a)
遍历 TagAttributeInfo 对象数组并查找 "id" 的便捷静态方法。
a | TagAttributeInfo 数组 |
return | 名称为 "id" 的 TagAttributeInfo 引用 |
getIdAttribute
public static TagAttributeInfo getIdAttribute(TagAttributeInfo[] a)
- Convenience static method that goes through an array of TagAttributeInfo
objects and looks for "id".
- Parameters:
a
- An array of TagAttributeInfo- Returns:
- The TagAttributeInfo reference with name "id"
public boolean
isFragment()
此属性的类型是否为 JspFragment。
return | 属性的类型是否为 JspFragment |
since | 2.0 |
isFragment
public boolean isFragment()
- Whether this attribute is of type JspFragment.
- Returns:
- if the attribute is of type JspFragment
- Since:
- JSP 2.0
英文文档:
getDescription
public String getDescription()
- Gets the description string of this tag attribute.
- Returns:
- 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. - Returns:
true
if this attribute accepts a deferred value;false
otherwise.- Since:
- 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. - Returns:
true
if this attribute accepts a deferred method;false
otherwise.- Since:
- 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
. - Returns:
- the name of the expected type
- Since:
- JSP 2.1
英文文档:
getMethodSignature
public String getMethodSignature()
- Returns the expected method signature of this deferred method attribute.
This method returns
null
ifisDeferredMethod()
returnsfalse
. - Returns:
- the method signature
- Since:
- JSP 2.1
public String
toString()
返回此 TagAttributeInfo 的 String 表示形式,适用于调试目的。
return | 此 TagAttributeInfo 的 String 表示形式 |
toString
public String toString()
- Returns a String representation of this TagAttributeInfo, suitable
for debugging purposes.
- Returns:
- a String representation of this TagAttributeInfo
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!