Method Summary |
|
public static void | addNodesByType(Node root, int[] nodeIds, List<Node> result) |
public static int | boundCaretOffset(CompilationInfo info, int caretOffset) |
public static boolean | containsOffset(Node node, int offset) |
public static int | findArgumentIndex(Node node, int offset) Look for the caret offset in the parameter list; return the
index of the parameter that contains it. |
public static Node | findBlock(AstPath path) |
public static Node | findBySignature(Node root, String signature) |
public static ClassNode | findClass(AstPath path) |
public static ClassNode | findClassAtOffset(Node root, int offset) |
public static IScopingNode | findClassOrModule(AstPath path) |
public static Node | findDynamicScope(Node node, AstPath path) |
public static Node | findLocalScope(Node node, AstPath path) |
public static MethodDefNode | findMethod(Node node, String name, Arity arity) |
public static MethodDefNode | findMethod(AstPath path) |
public static MethodDefNode | findMethodAtOffset(Node root, int offset) |
public static int | findOffset(FileObject fo, String methodName) |
public static void | findPrivateMethods(Node clz, Set<Node> protectedMethods, Set<Node> privateMethods) |
public static List<String> | gatherDocumentation(CompilationInfo info, BaseDocument baseDoc, Node node) Get the rdoc documentation associated with the given node in the given document. |
public static OffsetRange | getAliasNewRange(AliasNode node) Return the OffsetRange for an AliasNode that represents the new name portion. |
public static OffsetRange | getAliasOldRange(AliasNode node) Return the OffsetRange for an AliasNode that represents the old name portion. |
public static List<Node> | getApplicableBlocks(AstPath path, boolean includeNested) Return all the blocknodes that apply to the given node. |
public static int | getAstOffset(CompilationInfo info, int lexOffset) |
public static OffsetRange | getAstOffsets(CompilationInfo info, OffsetRange lexicalRange) |
public static SymbolNode[] | getAttrSymbols(Node node) |
public static String | getCallName(Node node) |
public static OffsetRange | getCallRange(Node node) For CallNodes, the offset range for the AST node includes the entire parameter list.
We want ONLY the actual call/operator name. |
public static String | getClassOrModuleName(IScopingNode node) |
public static List<ClassNode> | getClasses(Node root) |
public static List<String> | getDefArgs(MethodDefNode node, boolean namesOnly) Find the direct child which is an ArgsNode, and pick out the argument names
Parameters: node - The method definition node Parameters: namesOnly - If true, return only the parameter names for rest args andblocks. |
public static String | getDefName(Node node) |
public static ArgumentNode | getDefNameNode(MethodDefNode node) |
public static String | getDefSignature(MethodDefNode node) |
public static Node | getForeignNode(IndexedElement o, Node[] foreignRootRet) |
public static String | getFqn(Colon2Node c2n) |
public static String | getFqnName(AstPath path) |
public static OffsetRange | getFunctionNameRange(Node node) |
public static OffsetRange | getLValueRange(AssignableNode node) Return a range that matches the lvalue for an assignment. |
public static String | getMethodName(FileObject fo, int offset) Get the method name for the given offset - or null if it cannot be found. |
public static OffsetRange | getNameRange(Node node) |
public static RubyParseResult | getParseResult(CompilationInfo info) |
public static OffsetRange | getRange(Node node) |
public static Set<String> | getRequires(Node root) Return the set of requires that are defined in this AST
(no transitive closure though). |
public static Node | getRoot(CompilationInfo info) |
public static Node | getRoot(CompilationInfo info, String mimeType) |
public static Node | getRoot(ParserResult r) |
public static String | getSuperclass(ClassNode clz) |
public static Set<String> | getUsedConstants(RubyIndex index, AstPath path) |
public static Set<String> | getUsedFields(RubyIndex index, AstPath path) |
public static Set<String> | getUsedLocalNames(AstPath path, Node closest) |
public static Set<String> | getUsedMethods(RubyIndex index, AstPath path) |
public static String | guessName(CompilationInfo info, OffsetRange lexRange, OffsetRange astRange) |
public static boolean | isAttr(Node node) |
public static boolean | isCall(Node node) |
public static boolean | isCallFor(Node call, Arity callArity, Node method) Return true iff the given call note can be considered a valid call of the given method. |
public static boolean | isConstructorMethod(MethodDefNode node) |