Package org.jruby.ast

Examples of org.jruby.ast.ClassNode


   * Given the root {@link Node} in a JRuby AST will locate the name of the
   * class defined by that AST.
   * @throws IllegalArgumentException if no class is defined by the supplied AST
   */
  private static String findClassName(Node rootNode) {
    ClassNode classNode = findClassNode(rootNode);
    if (classNode == null) {
      throw new IllegalArgumentException("Unable to determine class name for root node '" + rootNode + "'");
    }
    Colon2Node node = (Colon2Node) classNode.getCPath();
    return node.getName();
  }
View Full Code Here

TOP

Related Classes of org.jruby.ast.ClassNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.