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 providedILinkRenderStrategy
implementations 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 ILinkParser
addLinkRenderStrategy(String pattern, ILinkRenderStrategy renderStrategy)
Adds a render strategy to the parser.String
parse(String text)
Parses thetext
and changes it according to the providedILinkRenderStrategy
implementations.
-
-
-
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 providedrenderStrategy
should be applied.renderStrategy
- theILinkRenderStrategy
which is applied to the text found by the providedpattern
.- Returns:
- this
ILinkParser
.
-
parse
public String parse(String text)
Description copied from interface:ILinkParser
Parses thetext
and changes it according to the providedILinkRenderStrategy
implementations.- Specified by:
parse
in interfaceILinkParser
- Parameters:
text
- the input text which should be modified.- Returns:
- the modified input text.
- See Also:
ILinkParser.parse(String)
-
-