Class ComponentTemplateImpl
java.lang.Object
org.apache.tapestry5.internal.parser.ComponentTemplateImpl
- All Implemented Interfaces:
ComponentTemplate
-
Constructor Summary
ConstructorsConstructorDescriptionComponentTemplateImpl
(Resource resource, List<TemplateToken> tokens, Map<String, Location> componentIds, boolean extension, boolean strictMixinParameters, Map<String, List<TemplateToken>> overrides) -
Method Summary
Modifier and TypeMethodDescriptionIdentifiesStartComponentToken
s with a non-blank id, mapping the id to its location (within the template).Returns the extension point ids, including both <t:extension-point> and <t:replace>.getExtensionPointTokens
(String extensionPointId) Returns a list of tokens associated with an extension point, or null if this template neither defines the extension point nor overrides it.Returns the resource that was parsed to form the template.Returns a list of tokens that were parsed from the template.boolean
Returns true if this component template is an extension of its parent class' template.boolean
Returns false.boolean
Indicates whether lax (the old default) or strict (the new default) mixin parameters are used.
-
Constructor Details
-
ComponentTemplateImpl
public ComponentTemplateImpl(Resource resource, List<TemplateToken> tokens, Map<String, Location> componentIds, boolean extension, boolean strictMixinParameters, Map<String, List<TemplateToken>> overrides) - Parameters:
resource
- the resource from which the template was parsedtokens
- the tokens of the template, a copy of this list will be madecomponentIds
- ids of components defined in the templateextension
- if this template is an extension of a parent-class templatestrictMixinParameters
- if the template was parsed with the 5.4 DTD and is strict about mixin parameters being fully qualifiedoverrides
- id to list of tokens for that override
-
-
Method Details
-
getResource
Description copied from interface:ComponentTemplate
Returns the resource that was parsed to form the template.- Specified by:
getResource
in interfaceComponentTemplate
-
getTokens
Description copied from interface:ComponentTemplate
Returns a list of tokens that were parsed from the template. The caller should not modify this list.- Specified by:
getTokens
in interfaceComponentTemplate
-
getComponentIds
Description copied from interface:ComponentTemplate
IdentifiesStartComponentToken
s with a non-blank id, mapping the id to its location (within the template). This is used to report unmatched ids (where the component, or its super-classes, do not define an embedded component).- Specified by:
getComponentIds
in interfaceComponentTemplate
- See Also:
-
usesStrictMixinParameters
Description copied from interface:ComponentTemplate
Indicates whether lax (the old default) or strict (the new default) mixin parameters are used. In strict mode, introduced with the 5.4 template DTD, mixin parameters must be qualified with the mixin name. In prior releases, Tapestry would attempt a search for a fit, and this causes ambiguities that can't be addressed.- Specified by:
usesStrictMixinParameters
in interfaceComponentTemplate
- Returns:
- true if a 5.4 or later DTD
-
isMissing
Returns false.- Specified by:
isMissing
in interfaceComponentTemplate
-
getExtensionPointTokens
Description copied from interface:ComponentTemplate
Returns a list of tokens associated with an extension point, or null if this template neither defines the extension point nor overrides it.- Specified by:
getExtensionPointTokens
in interfaceComponentTemplate
- Returns:
- list of tokens provided in this template, or null
-
getExtensionPointIds
Description copied from interface:ComponentTemplate
Returns the extension point ids, including both <t:extension-point> and <t:replace>.- Specified by:
getExtensionPointIds
in interfaceComponentTemplate
- Returns:
- set of extension point ids.
-
isExtension
Description copied from interface:ComponentTemplate
Returns true if this component template is an extension of its parent class' template.- Specified by:
isExtension
in interfaceComponentTemplate
-