jaxx.compiler.binding
Class JavaParserUtil

java.lang.Object
  extended by jaxx.compiler.binding.JavaParserUtil

public class JavaParserUtil
extends java.lang.Object

Created: 4 déc. 2009

Version:
$Revision: 1679 $

Mise a jour: $Date: 2009-12-08 18:21:03 +0100 (mar., 08 déc. 2009) $ par : $Author: tchemit $

Author:
Tony Chemit Copyright Code Lutin

Constructor Summary
JavaParserUtil()
           
 
Method Summary
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 in store with their dependencies expressions.
static java.lang.String getMethodInvocationParameters(java.lang.String code)
           
static java.lang.String getPropertyNameFromMethod(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 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.
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.
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaParserUtil

public JavaParserUtil()
Method Detail

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 in store with their dependencies expressions.

Also fill the literals list of literal expressions.

Parameters:
node - the node to scan
store - the store of expressions detected with all the expression which compose the expression (can be empty)
literals - the list of literal expressions detected
casts - 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 dependencies
literalExpressions - 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 dependencies
castsExpressions - 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)


Copyright © 2008-2010 CodeLutin. All Rights Reserved.