Class AbstractCommentParser
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser
- All Implemented Interfaces:
JavadocTagConstants
- Direct Known Subclasses:
JavadocParser
Parser specialized for decoding javadoc comments
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected static int
protected static int
protected static int
protected int
protected int[]
protected int
protected Object[]
boolean
static int
static int
protected long
protected boolean
static int
protected static int
protected int
static int
protected int
protected int[]
protected long[]
protected int
protected char[][]
protected int
protected long[]
protected int
protected int
protected boolean
protected int
protected int
protected int
protected int
protected int
protected int
protected int
protected int
protected int[]
protected boolean
protected int
protected static int
protected int
protected TypeReference[]
protected static int
boolean
protected Object
static int
boolean
char[]
static int
protected long
protected Parser
protected int
protected int
protected int
protected int
protected static int
protected static int
protected int
protected int
protected int
protected TypeReference[]
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.parser.JavadocTagConstants
ALL_TAGS_LENGTH, BLOCK_IDX, BLOCK_TAGS, BLOCK_TAGS_LENGTH, CLASS_TAGS, COMPILATION_UNIT_TAGS, FIELD_TAGS, HREF_TAG, INLINE_IDX, INLINE_TAGS, INLINE_TAGS_LENGTH, JAVADOC_TAG_TYPE, METHOD_TAGS, MODULE_TAGS, NO_TAG_VALUE, ORDERED_TAGS_NUMBER, PACKAGE_TAGS, PARAM_TAG_EXPECTED_ORDER, SEE_TAG_EXPECTED_ORDER, TAG_API_NOTE, TAG_API_NOTE_LENGTH, TAG_API_NOTE_VALUE, TAG_AUTHOR, TAG_AUTHOR_LENGTH, TAG_AUTHOR_VALUE, TAG_CATEGORY, TAG_CATEGORY_LENGTH, TAG_CATEGORY_VALUE, TAG_CODE, TAG_CODE_LENGTH, TAG_CODE_VALUE, TAG_DEPRECATED, TAG_DEPRECATED_LENGTH, TAG_DEPRECATED_VALUE, TAG_DOC_ROOT, TAG_DOC_ROOT_LENGTH, TAG_DOC_ROOT_VALUE, TAG_EXCEPTION, TAG_EXCEPTION_LENGTH, TAG_EXCEPTION_VALUE, TAG_HIDDEN, TAG_HIDDEN_LENGTH, TAG_HIDDEN_VALUE, TAG_IMPL_NOTE, TAG_IMPL_NOTE_LENGTH, TAG_IMPL_NOTE_VALUE, TAG_IMPL_SPEC, TAG_IMPL_SPEC_LENGTH, TAG_IMPL_SPEC_VALUE, TAG_INDEX, TAG_INDEX_LENGTH, TAG_INDEX_VALUE, TAG_INHERITDOC, TAG_INHERITDOC_LENGTH, TAG_INHERITDOC_VALUE, TAG_LINK, TAG_LINK_LENGTH, TAG_LINK_VALUE, TAG_LINKPLAIN, TAG_LINKPLAIN_LENGTH, TAG_LINKPLAIN_VALUE, TAG_LITERAL, TAG_LITERAL_LENGTH, TAG_LITERAL_VALUE, TAG_NAMES, TAG_OTHERS_VALUE, TAG_PARAM, TAG_PARAM_LENGTH, TAG_PARAM_VALUE, TAG_PROVIDES, TAG_PROVIDES_LENGTH, TAG_PROVIDES_VALUE, TAG_RETURN, TAG_RETURN_LENGTH, TAG_RETURN_VALUE, TAG_SEE, TAG_SEE_LENGTH, TAG_SEE_VALUE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_DATA_LENGTH, TAG_SERIAL_DATA_VALUE, TAG_SERIAL_FIELD, TAG_SERIAL_FIELD_LENGTH, TAG_SERIAL_FIELD_VALUE, TAG_SERIAL_LENGTH, TAG_SERIAL_VALUE, TAG_SINCE, TAG_SINCE_LENGTH, TAG_SINCE_VALUE, TAG_SUMMARY, TAG_SUMMARY_LENGTH, TAG_SUMMARY_VALUE, TAG_SYSTEM_PROPERTY, TAG_SYSTEM_PROPERTY_LENGTH, TAG_SYSTEM_PROPERTY_VALUE, TAG_THROWS, TAG_THROWS_LENGTH, TAG_THROWS_VALUE, TAG_TYPE_BLOCK, TAG_TYPE_INLINE, TAG_TYPE_NONE, TAG_USES, TAG_USES_LENGTH, TAG_USES_VALUE, TAG_VALUE, TAG_VALUE_LENGTH, TAG_VALUE_VALUE, TAG_VERSION, TAG_VERSION_LENGTH, TAG_VERSION_VALUE, THROWS_TAG_EXPECTED_ORDER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected void
protected abstract Object
createArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPos, long argNamePos)
protected boolean
createFakeReference(int start)
protected abstract Object
createFieldReference(Object receiver)
protected abstract Object
createMethodReference(Object receiver, List arguments)
protected abstract Object
createModuleTypeReference(int primitiveToken, int moduleRefTokenCount)
protected Object
protected abstract void
protected abstract Object
createTypeReference(int primitiveToken)
protected int
protected int
protected Object
parseArguments(Object receiver)
protected boolean
protected boolean
parseHtmlTag(int previousPosition, int endTextPosition)
Parse a possible HTML tag like: <code> <br> <h?protected boolean
parseIdentifierTag(boolean report)
protected Object
parseMember(Object receiver)
protected boolean
protected Object
parseQualifiedName(boolean reset)
protected Object
parseQualifiedName(boolean reset, boolean allowModule)
protected boolean
protected boolean
parseReference(boolean allowModule)
protected abstract boolean
parseTag(int previousPosition)
protected boolean
protected char
peekChar()
protected void
pushIdentifier(boolean newLength, boolean isToken)
protected void
pushOnAstStack(Object node, boolean newLength)
protected abstract boolean
pushParamName(boolean isTypeParam)
protected abstract boolean
pushSeeRef(Object statement)
protected void
pushText(int start, int end)
protected abstract boolean
pushThrowName(Object typeRef)
protected char
readChar()
protected int
protected int
protected int
protected void
recordInheritedPosition(long position)
protected void
refreshInlineTagPosition(int previousPosition)
protected void
protected void
setInlineTagStarted(boolean started)
protected void
protected Object
syntaxRecoverModuleQualifiedName(int primitiveToken, int moduleTokenCount)
protected Object
syntaxRecoverQualifiedName(int primitiveToken)
toString()
protected abstract void
protected void
protected boolean
verifyEndLine(int textPosition)
protected boolean
-
Field Details
-
COMPIL_PARSER
public static final int COMPIL_PARSER- See Also:
- Constant Field Values
-
DOM_PARSER
public static final int DOM_PARSER- See Also:
- Constant Field Values
-
SELECTION_PARSER
public static final int SELECTION_PARSER- See Also:
- Constant Field Values
-
COMPLETION_PARSER
public static final int COMPLETION_PARSER- See Also:
- Constant Field Values
-
SOURCE_PARSER
public static final int SOURCE_PARSER- See Also:
- Constant Field Values
-
FORMATTER_COMMENT_PARSER
public static final int FORMATTER_COMMENT_PARSER- See Also:
- Constant Field Values
-
PARSER_KIND
protected static final int PARSER_KIND- See Also:
- Constant Field Values
-
TEXT_PARSE
protected static final int TEXT_PARSE- See Also:
- Constant Field Values
-
TEXT_VERIF
protected static final int TEXT_VERIF- See Also:
- Constant Field Values
-
QUALIFIED_NAME_RECOVERY
protected static final int QUALIFIED_NAME_RECOVERY- See Also:
- Constant Field Values
-
ARGUMENT_RECOVERY
protected static final int ARGUMENT_RECOVERY- See Also:
- Constant Field Values
-
ARGUMENT_TYPE_RECOVERY
protected static final int ARGUMENT_TYPE_RECOVERY- See Also:
- Constant Field Values
-
EMPTY_ARGUMENT_RECOVERY
protected static final int EMPTY_ARGUMENT_RECOVERY- See Also:
- Constant Field Values
-
scanner
-
source
public char[] source -
sourceParser
-
checkDocComment
public boolean checkDocComment -
setJavadocPositions
public boolean setJavadocPositions -
reportProblems
public boolean reportProblems -
complianceLevel
protected long complianceLevel -
sourceLevel
protected long sourceLevel -
inheritedPositions
protected long[] inheritedPositions -
inheritedPositionsPtr
protected int inheritedPositionsPtr -
deprecated
protected boolean deprecated -
returnStatement
-
javadocStart
protected int javadocStart -
javadocEnd
protected int javadocEnd -
javadocTextStart
protected int javadocTextStart -
javadocTextEnd
protected int javadocTextEnd -
firstTagPosition
protected int firstTagPosition -
index
protected int index -
lineEnd
protected int lineEnd -
tokenPreviousPosition
protected int tokenPreviousPosition -
lastIdentifierEndPosition
protected int lastIdentifierEndPosition -
starPosition
protected int starPosition -
textStart
protected int textStart -
memberStart
protected int memberStart -
tagSourceStart
protected int tagSourceStart -
tagSourceEnd
protected int tagSourceEnd -
inlineTagStart
protected int inlineTagStart -
lineEnds
protected int[] lineEnds -
lineStarted
protected boolean lineStarted -
inlineTagStarted
protected boolean inlineTagStarted -
abort
protected boolean abort -
kind
protected int kind -
tagValue
protected int tagValue -
lastBlockTagValue
protected int lastBlockTagValue -
identifierPtr
protected int identifierPtr -
identifierStack
protected char[][] identifierStack -
identifierLengthPtr
protected int identifierLengthPtr -
identifierLengthStack
protected int[] identifierLengthStack -
identifierPositionStack
protected long[] identifierPositionStack -
AST_STACK_INCREMENT
protected static final int AST_STACK_INCREMENT- See Also:
- Constant Field Values
-
astPtr
protected int astPtr -
astStack
-
astLengthPtr
protected int astLengthPtr -
astLengthStack
protected int[] astLengthStack -
usesReferencesPtr
protected int usesReferencesPtr -
usesReferencesStack
-
providesReferencesPtr
protected int providesReferencesPtr -
providesReferencesStack
-
-
Constructor Details
-
AbstractCommentParser
-
-
Method Details
-
commentParse
protected boolean commentParse() -
consumeToken
protected void consumeToken() -
createArgumentReference
protected abstract Object createArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPos, long argNamePos) throws InvalidInputException- Throws:
InvalidInputException
-
createFakeReference
protected boolean createFakeReference(int start) -
createFieldReference
- Throws:
InvalidInputException
-
createMethodReference
protected abstract Object createMethodReference(Object receiver, List arguments) throws InvalidInputException- Throws:
InvalidInputException
-
createReturnStatement
-
createTag
protected abstract void createTag() -
createTypeReference
-
createModuleTypeReference
-
getTokenEndPosition
protected int getTokenEndPosition() -
getCurrentTokenType
protected int getCurrentTokenType()- Returns:
- Returns the currentTokenType.
-
parseArguments
- Throws:
InvalidInputException
-
parseHtmlTag
protected boolean parseHtmlTag(int previousPosition, int endTextPosition) throws InvalidInputExceptionParse a possible HTML tag like:- <code>
- <br>
- <h?>
- Parameters:
previousPosition
- The position of the '<' character on which the tag might startendTextPosition
- The position of the end of the previous text- Returns:
true
if a valid html tag has been parsed,false
otherwise- Throws:
InvalidInputException
- If any problem happens during the parse in this area
-
parseHref
- Throws:
InvalidInputException
-
parseIdentifierTag
protected boolean parseIdentifierTag(boolean report) -
parseMember
- Throws:
InvalidInputException
-
parseParam
- Throws:
InvalidInputException
-
parseQualifiedName
- Throws:
InvalidInputException
-
parseQualifiedName
protected Object parseQualifiedName(boolean reset, boolean allowModule) throws InvalidInputException- Throws:
InvalidInputException
-
parseReference
- Throws:
InvalidInputException
-
parseReference
- Throws:
InvalidInputException
-
parseTag
- Throws:
InvalidInputException
-
parseThrows
protected boolean parseThrows() -
peekChar
protected char peekChar() -
pushIdentifier
protected void pushIdentifier(boolean newLength, boolean isToken) -
pushOnAstStack
-
pushParamName
protected abstract boolean pushParamName(boolean isTypeParam) -
pushSeeRef
-
pushText
protected void pushText(int start, int end) -
pushThrowName
-
readChar
protected char readChar() -
readToken
- Throws:
InvalidInputException
-
readTokenAndConsume
- Throws:
InvalidInputException
-
readTokenSafely
protected int readTokenSafely() -
recordInheritedPosition
protected void recordInheritedPosition(long position) -
refreshInlineTagPosition
protected void refreshInlineTagPosition(int previousPosition) -
refreshReturnStatement
protected void refreshReturnStatement() -
setInlineTagStarted
protected void setInlineTagStarted(boolean started)- Parameters:
started
- the inlineTagStarted to set
-
syntaxRecoverQualifiedName
- Throws:
InvalidInputException
-
syntaxRecoverModuleQualifiedName
protected Object syntaxRecoverModuleQualifiedName(int primitiveToken, int moduleTokenCount) throws InvalidInputException- Throws:
InvalidInputException
-
toString
-
updateDocComment
protected abstract void updateDocComment() -
updateLineEnd
protected void updateLineEnd() -
verifyEndLine
protected boolean verifyEndLine(int textPosition) -
verifySpaceOrEndComment
protected boolean verifySpaceOrEndComment() -
setSourceComplianceLevel
protected void setSourceComplianceLevel()
-