java.lang.Object
jakarta.faces.view.facelets.TagAttribute
com.sun.faces.facelets.tag.TagAttributeImpl
Representation of a Tag's attribute in a Facelet File
- Version:
- $Id$
- Author:
- Jacob Hookom
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(FaceletContext ctx) If literal,returnBoolean.valueOf(java.lang.String)passing our value, otherwise callgetObject(FaceletContext, Class).intgetInt(FaceletContext ctx) If literal, callInteger.parseInt(String), otherwise callgetObject(FaceletContext, Class).Local name of this attributeThe location of this attribute in the FaceletContextjakarta.el.MethodExpressiongetMethodExpression(FaceletContext ctx, Class type, Class[] paramTypes) Create a MethodExpression, using this attribute's value as the expression String.The resolved Namespace for this attributegetObject(FaceletContext ctx) Delegates to getObject with Object.class as a paramgetObject(FaceletContext ctx, Class type) If literal, simply coerce our String literal value using an ExpressionFactory, otherwise create a ValueExpression and evaluate it.getQName()The qualified name for this attributegetTag()A reference to the Tag for which this class represents the attributes.getValue()Return the literal value of this attributegetValue(FaceletContext ctx) If literal, then return our value, otherwise delegate to getObject, passing String.class.jakarta.el.ValueExpressiongetValueExpression(FaceletContext ctx, Class type) Create a ValueExpression, using this attribute's literal value and the passed expected type.jakarta.el.ValueExpressiongetValueExpression(FaceletContext ctx, String expr, Class type) booleanIf this TagAttributeImpl is literal (not #{..} or ${..})voidSet a reference to the Tag for which this class represents the attributes.toString()
-
Constructor Details
-
TagAttributeImpl
public TagAttributeImpl() -
TagAttributeImpl
-
-
Method Details
-
getBoolean
If literal,return
Boolean.valueOf(java.lang.String)passing our value, otherwise callgetObject(FaceletContext, Class).- Specified by:
getBooleanin classTagAttribute- Parameters:
ctx- FaceletContext to use- Returns:
- boolean value
- See Also:
-
getInt
If literal, callInteger.parseInt(String), otherwise callgetObject(FaceletContext, Class).- Specified by:
getIntin classTagAttribute- Parameters:
ctx- FaceletContext to use- Returns:
- int value
- See Also:
-
getLocalName
Local name of this attribute- Specified by:
getLocalNamein classTagAttribute- Returns:
- local name of this attribute
-
getLocation
The location of this attribute in the FaceletContext- Specified by:
getLocationin classTagAttribute- Returns:
- the TagAttributeImpl's location
-
getMethodExpression
public jakarta.el.MethodExpression getMethodExpression(FaceletContext ctx, Class type, Class[] paramTypes) Create a MethodExpression, using this attribute's value as the expression String.- Specified by:
getMethodExpressionin classTagAttribute- Parameters:
ctx- FaceletContext to usetype- expected return typeparamTypes- parameter type- Returns:
- a MethodExpression instance
- See Also:
-
ExpressionFactory.createMethodExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class, java.lang.Class[])MethodExpression
-
getNamespace
The resolved Namespace for this attribute- Specified by:
getNamespacein classTagAttribute- Returns:
- resolved Namespace
-
getObject
Delegates to getObject with Object.class as a param- Specified by:
getObjectin classTagAttribute- Parameters:
ctx- FaceletContext to use- Returns:
- Object representation of this attribute's value
- See Also:
-
getQName
The qualified name for this attribute- Specified by:
getQNamein classTagAttribute- Returns:
- the qualified name for this attribute
-
getTag
Description copied from class:TagAttributeA reference to the Tag for which this class represents the attributes. For compatibility with previous implementations, an implementation is provided that returns
null.- Overrides:
getTagin classTagAttribute- Returns:
- the
Tagfor which this class represents the attributes.
-
setTag
Description copied from class:TagAttributeSet a reference to the Tag for which this class represents the attributes. The VDL runtime must ensure that this method is called before any
FaceletHandlers for this element are instantiated. For compatibility with previous implementations, a no-op implementation is provided.- Overrides:
setTagin classTagAttribute- Parameters:
tag- the tag we represent.
-
getValue
Return the literal value of this attribute- Specified by:
getValuein classTagAttribute- Returns:
- literal value
-
getValue
If literal, then return our value, otherwise delegate to getObject, passing String.class.- Specified by:
getValuein classTagAttribute- Parameters:
ctx- FaceletContext to use- Returns:
- String value of this attribute
- See Also:
-
getObject
If literal, simply coerce our String literal value using an ExpressionFactory, otherwise create a ValueExpression and evaluate it.- Specified by:
getObjectin classTagAttribute- Parameters:
ctx- FaceletContext to usetype- expected return type- Returns:
- Object value of this attribute
- See Also:
-
ExpressionFactory.coerceToType(java.lang.Object, java.lang.Class)ExpressionFactory.createValueExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class)ValueExpression
-
getValueExpression
Create a ValueExpression, using this attribute's literal value and the passed expected type.- Specified by:
getValueExpressionin classTagAttribute- Parameters:
ctx- FaceletContext to usetype- expected return type- Returns:
- ValueExpression instance
- See Also:
-
ExpressionFactory.createValueExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class)ValueExpression
-
isLiteral
public boolean isLiteral()If this TagAttributeImpl is literal (not #{..} or ${..})- Specified by:
isLiteralin classTagAttribute- Returns:
- true if this attribute is literal
-
toString
-
getValueExpression
-