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 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 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)