Package jakarta.faces.view.facelets
Class TagAttribute
- java.lang.Object
- 
- jakarta.faces.view.facelets.TagAttribute
 
- 
 public abstract class TagAttribute extends Object Representation of a Tag's attribute in a Facelet File
- 
- 
Constructor SummaryConstructors Constructor Description TagAttribute()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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 StringgetLocalName()Local name of this attributeabstract LocationgetLocation()The 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 StringgetNamespace()The 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 attributeTaggetTag()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 booleanisLiteral()If this TagAttribute is literal (not #{..} or ${..})voidsetTag(Tag tag)
 
- 
- 
- 
Method Detail- 
getBooleanpublic abstract boolean getBoolean(FaceletContext ctx) If literal, returnBoolean.getBoolean(java.lang.String)passing our value, otherwise callgetObject(FaceletContext, Class).- Parameters:
- ctx- FaceletContext to use
- Returns:
- boolean value
- See Also:
- Boolean.getBoolean(java.lang.String),- getObject(FaceletContext, Class)
 
 - 
getIntpublic abstract int getInt(FaceletContext ctx) If literal, callInteger.parseInt(String), otherwise callgetObject(FaceletContext, Class).- Parameters:
- ctx- FaceletContext to use
- Returns:
- int value
- See Also:
- Integer.parseInt(java.lang.String),- getObject(FaceletContext, Class)
 
 - 
getLocalNamepublic abstract String getLocalName() Local name of this attribute- Returns:
- local name of this attribute
 
 - 
getLocationpublic abstract Location getLocation() The 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
 
 - 
getNamespacepublic abstract String getNamespace() The resolved Namespace for this attribute- Returns:
- resolved Namespace
 
 - 
getObjectpublic abstract Object getObject(FaceletContext ctx) Delegates to getObject with Object.class as a param- Parameters:
- ctx- FaceletContext to use
- Returns:
- Object representation of this attribute's value
- See Also:
- getObject(FaceletContext, Class)
 
 - 
getObjectpublic abstract Object getObject(FaceletContext ctx, Class type) If 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
 
 - 
getQNamepublic abstract String getQName() The qualified name for this attribute- Returns:
- the qualified name for this attribute
 
 - 
getValuepublic abstract String getValue() Return the literal value of this attribute- Returns:
- literal value
 
 - 
getValuepublic abstract String getValue(FaceletContext ctx) If 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:
- getObject(FaceletContext, Class)
 
 - 
getValueExpressionpublic abstract jakarta.el.ValueExpression getValueExpression(FaceletContext ctx, Class type) Create 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
 
 - 
getTagpublic Tag getTag() - Returns:
- Since:
- 2.2
 
 - 
setTagpublic void setTag(Tag tag) - Parameters:
- tag-
- Since:
- 2.2
 
 
- 
 
-