public class ParseResult<T> extends Object
Constructor and Description |
---|
ParseResult(T result,
List<Problem> problems,
List<JavaToken> tokens,
CommentsCollection commentsCollection)
General constructor.
|
Modifier and Type | Method and Description |
---|---|
Optional<CommentsCollection> |
getCommentsCollection() |
Problem |
getProblem(int i) |
List<Problem> |
getProblems() |
Optional<T> |
getResult() |
Optional<List<JavaToken>> |
getTokens() |
boolean |
isSuccessful() |
String |
toString() |
public ParseResult(T result, List<Problem> problems, List<JavaToken> tokens, CommentsCollection commentsCollection)
result
- the AST, or empty if it wasn't created.problems
- a list of encountered parsing problems.tokens
- the complete list of tokens that were parsed, or empty if parsing failed completely.public boolean isSuccessful()
public List<Problem> getProblems()
public Problem getProblem(int i)
i
'th encountered parsing problem. May throw IndexOutOfBoundsException
.public Optional<List<JavaToken>> getTokens()
public Optional<CommentsCollection> getCommentsCollection()
public Optional<T> getResult()
Copyright © 2007–2017. All rights reserved.