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
IrDocFragment s. |
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, setBlockParsers
protected JavadocBlockParser()
protected JavadocBlockParser(List<? extends JavadocBlockParser> blockParsers)
blockParsers
- the inline block parsersIllegalArgumentException
- if the parameter is null
public 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 false
public 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 null
public IrDocBlock newBlock(String tag, List<? extends IrDocFragment> fragments)
tag
- the tag name, or null
for synopsis blocksfragments
- the fragmentsIllegalArgumentException
- if fragments
is null
public List<IrDocFragment> fetchRestFragments(JavadocScanner scanner) throws JavadocParseException
IrDocFragment
s.scanner
- the target scannerJavadocParseException
- if error was occurred while converting tokensIllegalArgumentException
- if the parameter is null
public IrDocSimpleName fetchSimpleName(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocName fetchName(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocBasicType fetchBasicType(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocBasicType fetchPrimitiveType(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocNamedType fetchNamedType(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocType fetchType(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocField fetchField(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocMethod fetchMethod(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
public IrDocFragment fetchLinkTarget(JavadocScanner scanner)
scanner
- the target scannernull
IllegalArgumentException
- if the parameter is null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.