Class GeneratedJavaParserBase
java.lang.Object
com.github.javaparser.GeneratedJavaParserBase
- Direct Known Subclasses:
GeneratedJavaParser
Base class for
GeneratedJavaParser-
Field Summary
FieldsModifier and TypeFieldDescription/(package private) boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd obj to list and return it.(package private) <T> List<T> Add obj to list(package private) voidaddProblem(String message) addWhenNotNull(NodeList<T> list, T obj) Add obj to list only when list is not nullQuickly create a new, empty, NodeList(package private) ExpressiongenerateLambda(Expression ret, Statement lambdaBody) Workaround for rather complex ambiguity that lambda's create(package private) CommentsCollection(package private) abstract Token(package private) abstract TokengetToken(int index) Return the list of JavaParser specific tokens that have been encountered while parsing code using this parser.(package private) abstract GeneratedJavaParserTokenManager/ Interface with the generated code(package private) ArrayCreationExprjuggleArrayCreation(TokenRange range, List<TokenRange> levelRanges, Type type, NodeList<Expression> dimensions, List<NodeList<AnnotationExpr>> arrayAnnotations, ArrayInitializerExpr arrayInitializerExpr) Throws together an ArrayCreationExpr from a lot of pieces(package private) TypejuggleArrayType(Type partialType, List<ArrayType.ArrayBracketPair> additionalBrackets) Throws together a Type, taking care of all the array bracketsprivate StringmakeMessageForParseException(ParseException exception) This is the code from ParseException.initialise, modified to be more horizontal.(package private) JavaTokennodeListBegin(NodeList<?> l) Get the token that starts the NodeList l(package private) JavaTokenorIfInvalid(JavaToken firstChoice, Node secondChoice) (package private) JavaTokenorIfInvalid(JavaToken firstChoice, JavaToken secondChoice) Add obj to list at position posprivate voidpropagateRangeGrowthOnRight(Node node, Node endNode) Propagate expansion of the range on the right to the parent.(package private) TokenRangeReturn a TokenRange spanning from begin to end(package private) TokenRangeReturn a TokenRange spanning from begin to end(package private) TokenRangeReturn a TokenRange spanning from begin to end(package private) TokenRangeReturn a TokenRange spanning from begin to end(package private) TokenRangerecover(int recoveryTokenType, ParseException p) (package private) TokenRangerecoverStatement(int recoveryTokenType, int lBraceType, int rBraceType, ParseException p) (package private) abstract void(package private) void(package private) NamescopeToName(Expression scope) Converts a NameExpr or a FieldAccessExpr scope to a Name.(package private) voidsetStoreTokens(boolean storeTokens) (package private) voidsetTokenKind(int newKind) (package private) void(package private) abstract JavaTokentoken()(package private) TokenRange(package private) NodeList<TypeDeclaration<?>> typeDeclarationsForCu(NodeList<BodyDeclaration<?>> bodyDeclarations) (package private) String(package private) String
-
Field Details
-
problems
-
storeTokens
boolean storeTokens
-
-
Constructor Details
-
GeneratedJavaParserBase
GeneratedJavaParserBase()
-
-
Method Details
-
getTokenSource
/ Interface with the generated code -
ReInit
-
token
-
getNextToken
-
getToken
-
reset
-
getTokens
-
getCommentsCollection
CommentsCollection getCommentsCollection() -
addProblem
-
tokenRange
TokenRange tokenRange() -
range
Return a TokenRange spanning from begin to end -
range
Return a TokenRange spanning from begin to end -
range
Return a TokenRange spanning from begin to end -
range
Return a TokenRange spanning from begin to end -
orIfInvalid
-
orIfInvalid
-
nodeListBegin
-
setTokenKind
void setTokenKind(int newKind) -
setStoreTokens
void setStoreTokens(boolean storeTokens) -
recover
-
recoverStatement
TokenRange recoverStatement(int recoveryTokenType, int lBraceType, int rBraceType, ParseException p) -
emptyNodeList
-
add
-
addWhenNotNull
-
prepend
-
add
-
propagateRangeGrowthOnRight
Propagate expansion of the range on the right to the parent. This is necessary when the right border of the child is determining the right border of the parent (i.e., the child is the last element of the parent). In this case when we "enlarge" the child we should enlarge also the parent. -
generateLambda
Workaround for rather complex ambiguity that lambda's create -
juggleArrayCreation
ArrayCreationExpr juggleArrayCreation(TokenRange range, List<TokenRange> levelRanges, Type type, NodeList<Expression> dimensions, List<NodeList<AnnotationExpr>> arrayAnnotations, ArrayInitializerExpr arrayInitializerExpr) Throws together an ArrayCreationExpr from a lot of pieces -
juggleArrayType
Throws together a Type, taking care of all the array brackets -
makeMessageForParseException
This is the code from ParseException.initialise, modified to be more horizontal. -
scopeToName
Converts a NameExpr or a FieldAccessExpr scope to a Name. -
unquote
-
unTripleQuote
-
setYieldSupported
void setYieldSupported() -
typeDeclarationsForCu
-