public class JavaParserUtil extends Object
| Constructor and Description |
|---|
JavaParserUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
getExpressions(SimpleNode node,
Map<SimpleNode,List<SimpleNode>> store,
List<SimpleNode> literals,
Map<SimpleNode,List<SimpleNode>> casts)
Obtain all expressions of a node and store them in
store with their dependencies expressions. |
static String |
getMethodInvocationParameters(String code) |
static String |
getPropertyNameFromMethod(String code) |
static Set<String> |
getRequired(Set<SimpleNode> store,
Map<SimpleNode,List<SimpleNode>> casts) |
static void |
removeLiteralExpressions(Map<SimpleNode,List<SimpleNode>> store,
List<SimpleNode> literalExpressions)
Remove from expressions store, all literal expressions and dependencies on it.
|
static void |
removeNoneStandaloneExpressions(Map<SimpleNode,List<SimpleNode>> store,
Map<SimpleNode,List<SimpleNode>> castsExpressions)
Remove from expressions sotre, all expressions with dependencies.
|
static void |
scanForExpressions(SimpleNode node,
SimpleNode lastExpressionNode,
Map<SimpleNode,List<SimpleNode>> store,
List<SimpleNode> literals,
Map<SimpleNode,List<SimpleNode>> casts) |
public static void getExpressions(SimpleNode node, Map<SimpleNode,List<SimpleNode>> store, List<SimpleNode> literals, Map<SimpleNode,List<SimpleNode>> casts)
store with their dependencies expressions.
Also fill the literals list of literal expressions.node - the node to scanstore - the store of expressions detected with all the expression which compose the expression (can be empty)literals - the list of literal expressions detectedcasts - the list of casted expression detectedpublic static void removeLiteralExpressions(Map<SimpleNode,List<SimpleNode>> store, List<SimpleNode> literalExpressions)
store - the store of expressions with theirs dependenciesliteralExpressions - the unvierse of literal expressionspublic static void removeNoneStandaloneExpressions(Map<SimpleNode,List<SimpleNode>> store, Map<SimpleNode,List<SimpleNode>> castsExpressions)
store - the store of expressions with their dependenciescastsExpressions - list of cast expression to keeppublic static Set<String> getRequired(Set<SimpleNode> store, Map<SimpleNode,List<SimpleNode>> casts)
public static void scanForExpressions(SimpleNode node, SimpleNode lastExpressionNode, Map<SimpleNode,List<SimpleNode>> store, List<SimpleNode> literals, Map<SimpleNode,List<SimpleNode>> casts)
Copyright © 2008–2019 Ultreia.io. All rights reserved.