Class LinkParser
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.basic.LinkParser
-
- All Implemented Interfaces:
ILinkParser
- Direct Known Subclasses:
DefaultLinkParser
public class LinkParser extends Object implements ILinkParser
This base implementation iterates over all providedILinkRenderStrategyimplementations and applies them to the input text.- Author:
- Gerolf Seitz
-
-
Constructor Summary
Constructors Constructor Description LinkParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ILinkParseraddLinkRenderStrategy(String pattern, ILinkRenderStrategy renderStrategy)Adds a render strategy to the parser.Stringparse(String text)Parses thetextand changes it according to the providedILinkRenderStrategyimplementations.
-
-
-
Constructor Detail
-
LinkParser
public LinkParser()
-
-
Method Detail
-
addLinkRenderStrategy
public ILinkParser addLinkRenderStrategy(String pattern, ILinkRenderStrategy renderStrategy)
Adds a render strategy to the parser.- Parameters:
pattern- the pattern to which the providedrenderStrategyshould be applied.renderStrategy- theILinkRenderStrategywhich is applied to the text found by the providedpattern.- Returns:
- this
ILinkParser.
-
parse
public String parse(String text)
Description copied from interface:ILinkParserParses thetextand changes it according to the providedILinkRenderStrategyimplementations.- Specified by:
parsein interfaceILinkParser- Parameters:
text- the input text which should be modified.- Returns:
- the modified input text.
- See Also:
ILinkParser.parse(String)
-
-