Package jakarta.faces.view.facelets
Class TagAttribute
java.lang.Object
jakarta.faces.view.facelets.TagAttribute
Representation of a Tag's attribute in a Facelet File
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract booleangetBoolean(FaceletContext ctx) If literal, returnBoolean.getBoolean(java.lang.String)passing our value, otherwise callgetObject(FaceletContext, Class).abstract intgetInt(FaceletContext ctx) If literal, callInteger.parseInt(String), otherwise callgetObject(FaceletContext, Class).abstract StringLocal name of this attributeabstract LocationThe location of this attribute in the FaceletContextabstract jakarta.el.MethodExpressiongetMethodExpression(FaceletContext ctx, Class type, Class[] paramTypes) Create a MethodExpression, using this attribute's value as the expression String.abstract StringThe resolved Namespace for this attributeabstract ObjectgetObject(FaceletContext ctx) Delegates to getObject with Object.class as a paramabstract ObjectgetObject(FaceletContext ctx, Class type) If literal, simply coerce our String literal value using an ExpressionFactory, otherwise create a ValueExpression and evaluate it.abstract StringgetQName()The qualified name for this attributegetTag()abstract StringgetValue()Return the literal value of this attributeabstract StringgetValue(FaceletContext ctx) If literal, then return our value, otherwise delegate to getObject, passing String.class.abstract jakarta.el.ValueExpressiongetValueExpression(FaceletContext ctx, Class type) Create a ValueExpression, using this attribute's literal value and the passed expected type.abstract booleanIf this TagAttribute is literal (not #{..} or ${..})void
- 
Constructor Details- 
TagAttributepublic TagAttribute()
 
- 
- 
Method Details- 
getBooleanIf literal, returnBoolean.getBoolean(java.lang.String)passing our value, otherwise callgetObject(FaceletContext, Class).- Parameters:
- ctx- FaceletContext to use
- Returns:
- boolean value
- See Also:
 
- 
getIntIf literal, callInteger.parseInt(String), otherwise callgetObject(FaceletContext, Class).- Parameters:
- ctx- FaceletContext to use
- Returns:
- int value
- See Also:
 
- 
getLocalNameLocal name of this attribute- Returns:
- local name of this attribute
 
- 
getLocationThe location of this attribute in the FaceletContext- Returns:
- the TagAttribute's location
 
- 
getMethodExpressionpublic abstract jakarta.el.MethodExpression getMethodExpression(FaceletContext ctx, Class type, Class[] paramTypes) Create a MethodExpression, using this attribute's value as the expression String.- Parameters:
- ctx- FaceletContext to use
- type- expected return type
- paramTypes- parameter type
- Returns:
- a MethodExpression instance
- See Also:
- 
- ExpressionFactory.createMethodExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class, java.lang.Class[])
- MethodExpression
 
 
- 
getNamespaceThe resolved Namespace for this attribute- Returns:
- resolved Namespace
 
- 
getObjectDelegates to getObject with Object.class as a param- Parameters:
- ctx- FaceletContext to use
- Returns:
- Object representation of this attribute's value
- See Also:
 
- 
getObjectIf literal, simply coerce our String literal value using an ExpressionFactory, otherwise create a ValueExpression and evaluate it.- Parameters:
- ctx- FaceletContext to use
- type- 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
 
 
- 
getQNameThe qualified name for this attribute- Returns:
- the qualified name for this attribute
 
- 
getValueReturn the literal value of this attribute- Returns:
- literal value
 
- 
getValueIf literal, then return our value, otherwise delegate to getObject, passing String.class.- Parameters:
- ctx- FaceletContext to use
- Returns:
- String value of this attribute
- See Also:
 
- 
getValueExpressionCreate a ValueExpression, using this attribute's literal value and the passed expected type.- Parameters:
- ctx- FaceletContext to use
- type- expected return type
- Returns:
- ValueExpression instance
- See Also:
- 
- ExpressionFactory.createValueExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class)
- ValueExpression
 
 
- 
isLiteralpublic abstract boolean isLiteral()If this TagAttribute is literal (not #{..} or ${..})- Returns:
- true if this attribute is literal
 
- 
getTag- Returns:
- Since:
- 2.2
 
- 
setTag- Parameters:
- tag-
- Since:
- 2.2
 
 
-