Package jaxx.compiler.binding
Class JavaParserUtil
java.lang.Object
jaxx.compiler.binding.JavaParserUtil
public class JavaParserUtil
extends java.lang.Object
Created: 4 déc. 2009
- Version:
- $Revision$ Mise a jour: $Date$ par : $Author$
- Author:
- Tony Chemit - chemit@codelutin.com
-
Constructor Summary
Constructors Constructor Description JavaParserUtil() -
Method Summary
Modifier and Type Method Description static voidgetExpressions(SimpleNode node, java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.List<SimpleNode> literals, java.util.Map<SimpleNode,java.util.List<SimpleNode>> casts)Obtain all expressions of a node and store them instorewith their dependencies expressions.static java.lang.StringgetMethodInvocationParameters(java.lang.String code)static java.lang.StringgetPropertyNameFromMethod(java.lang.String code)static java.util.Set<java.lang.String>getRequired(java.util.Set<SimpleNode> store, java.util.Map<SimpleNode,java.util.List<SimpleNode>> casts)static voidremoveLiteralExpressions(java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.List<SimpleNode> literalExpressions)Remove from expressions store, all literal expressions and dependencies on it.static voidremoveNoneStandaloneExpressions(java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.Map<SimpleNode,java.util.List<SimpleNode>> castsExpressions)Remove from expressions sotre, all expressions with dependencies.static voidscanForExpressions(SimpleNode node, SimpleNode lastExpressionNode, java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.List<SimpleNode> literals, java.util.Map<SimpleNode,java.util.List<SimpleNode>> casts)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JavaParserUtil
public JavaParserUtil()
-
-
Method Details
-
getExpressions
public static void getExpressions(SimpleNode node, java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.List<SimpleNode> literals, java.util.Map<SimpleNode,java.util.List<SimpleNode>> casts)Obtain all expressions of a node and store them instorewith their dependencies expressions. Also fill theliteralslist of literal expressions.- Parameters:
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 detected
-
removeLiteralExpressions
public static void removeLiteralExpressions(java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.List<SimpleNode> literalExpressions)Remove from expressions store, all literal expressions and dependencies on it.- Parameters:
store- the store of expressions with theirs dependenciesliteralExpressions- the unvierse of literal expressions
-
removeNoneStandaloneExpressions
public static void removeNoneStandaloneExpressions(java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.Map<SimpleNode,java.util.List<SimpleNode>> castsExpressions)Remove from expressions sotre, all expressions with dependencies.- Parameters:
store- the store of expressions with their dependenciescastsExpressions- list of cast expression to keep
-
getRequired
public static java.util.Set<java.lang.String> getRequired(java.util.Set<SimpleNode> store, java.util.Map<SimpleNode,java.util.List<SimpleNode>> casts) -
getMethodInvocationParameters
public static java.lang.String getMethodInvocationParameters(java.lang.String code) -
getPropertyNameFromMethod
public static java.lang.String getPropertyNameFromMethod(java.lang.String code) -
scanForExpressions
public static void scanForExpressions(SimpleNode node, SimpleNode lastExpressionNode, java.util.Map<SimpleNode,java.util.List<SimpleNode>> store, java.util.List<SimpleNode> literals, java.util.Map<SimpleNode,java.util.List<SimpleNode>> casts)
-