public abstract class JavadocBlockParser extends JavadocBaseParser
| Modifier | Constructor and Description |
|---|---|
protected |
JavadocBlockParser()
Creates a new instance without any inline block parsers.
|
protected |
JavadocBlockParser(List<? extends JavadocBlockParser> blockParsers)
Creates a new instance with inline block parsers.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canAccept(String tag)
Returns whether this parser can accept the block with target tag name.
|
IrDocBasicType |
fetchBasicType(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded basic type.
|
IrDocField |
fetchField(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded field.
|
IrDocFragment |
fetchLinkTarget(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded link target.
|
IrDocMethod |
fetchMethod(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded method or constructor.
|
IrDocName |
fetchName(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded (simple or qualified) name.
|
IrDocNamedType |
fetchNamedType(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded named type.
|
IrDocBasicType |
fetchPrimitiveType(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded primitive type.
|
List<IrDocFragment> |
fetchRestFragments(JavadocScanner scanner)
Consumes all tokens from the scanner, and converts them to a list of
IrDocFragments. |
IrDocSimpleName |
fetchSimpleName(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded simple name.
|
IrDocType |
fetchType(JavadocScanner scanner)
Consumes tokens from the scanner and returns the corresponded type.
|
IrDocBlock |
newBlock(String tag,
List<? extends IrDocFragment> fragments)
Creates a new block from its tag and fragments.
|
abstract IrDocBlock |
parse(String tag,
JavadocScanner scanner)
Parses a block.
|
getBlockParsers, parseBlock, setBlockParsersprotected JavadocBlockParser()
protected JavadocBlockParser(List<? extends JavadocBlockParser> blockParsers)
blockParsers - the inline block parsersIllegalArgumentException - if the parameter is nullpublic abstract boolean canAccept(String tag)
null.tag - the target tag name (without "@"), or null for synopsis blockstrue if this parser can accept the target block, otherwise falsepublic abstract IrDocBlock parse(String tag, JavadocScanner scanner) throws JavadocParseException
tag - the target tag name (without "@"), or null for synopsis blocksscanner - the scanner for providing block contentsJavadocParseException - if error occurred while parsing the target blockIllegalArgumentException - if scanner is nullpublic IrDocBlock newBlock(String tag, List<? extends IrDocFragment> fragments)
tag - the tag name, or null for synopsis blocksfragments - the fragmentsIllegalArgumentException - if fragments is nullpublic List<IrDocFragment> fetchRestFragments(JavadocScanner scanner) throws JavadocParseException
IrDocFragments.scanner - the target scannerJavadocParseException - if error was occurred while converting tokensIllegalArgumentException - if the parameter is nullpublic IrDocSimpleName fetchSimpleName(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocName fetchName(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocBasicType fetchBasicType(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocBasicType fetchPrimitiveType(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocNamedType fetchNamedType(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocType fetchType(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocField fetchField(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocMethod fetchMethod(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullpublic IrDocFragment fetchLinkTarget(JavadocScanner scanner)
scanner - the target scannernullIllegalArgumentException - if the parameter is nullCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.