Package io.quarkus.qute
Interface SectionHelperFactory.SectionInitContext
- All Superinterfaces:
ErrorInitializer,SectionHelperFactory.ParserDelegate
- Enclosing interface:
- SectionHelperFactory<T extends SectionHelper>
public static interface SectionHelperFactory.SectionInitContext
extends SectionHelperFactory.ParserDelegate
Section initialization context.
-
Method Summary
Modifier and TypeMethodDescriptiondefault SectionBlockNote that the returned supplier may only be used after the template is parsed, e.g.getExpression(String parameterName) Note that the expression must be registered in theSectionHelperFactory.initializeBlock(Scope, BlockInfo)first.default TemplateNode.Origindefault StringgetParameter(int position) default StringgetParameter(String name) default StringgetParameterOrDefault(String name, String defaultValue) default booleanhasParameter(String name) parseValue(String value) Parse the specified value.Methods inherited from interface io.quarkus.qute.ErrorInitializer
errorMethods inherited from interface io.quarkus.qute.SectionHelperFactory.ParserDelegate
createParserError
-
Method Details
-
getParameters
- Returns:
- the parameters of the main block
- See Also:
-
hasParameter
- Returns:
trueif the main block declares a parameter of the given name
-
getParameter
- Returns:
- the parameter, or null/
Parameter.EMPTYif the main block does not declare a parameter of the given name
-
getParameter
- Returns:
- the parameter for the specified position
- See Also:
-
getParameterOrDefault
- Parameters:
name-defaultValue-- Returns:
- the param or the default value if not specified
-
getExpression
Note that the expression must be registered in theSectionHelperFactory.initializeBlock(Scope, BlockInfo)first.- Parameters:
parameterName-- Returns:
- the expression registered for the main block under the specified param name, or
null - See Also:
-
parseValue
Parse the specified value. The expression is not registered in the template.- Parameters:
value-- Returns:
- a new expression
-
getBlocks
List<SectionBlock> getBlocks() -
getBlock
- Parameters:
label-- Returns:
- the first block with the given label, or {code null} if no such exists
-
getEngine
Engine getEngine()- Returns:
- the engine
-
getOrigin
- Returns:
- the origin of the section start tag
-
getCurrentTemplate
Note that the returned supplier may only be used after the template is parsed, e.g. during the invocation ofSectionHelper.resolve(io.quarkus.qute.SectionHelper.SectionResolutionContext).- Returns:
- the current template
-