Java Doc for AstUtilities.java in  » IDE-Netbeans » ruby » org » netbeans » modules » ruby » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » ruby » org.netbeans.modules.ruby 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.ruby.AstUtilities

AstUtilities
public class AstUtilities (Code)
Various utilities for operating on the JRuby ASTs that are used elsewhere. addNodesByType
author:
   Tor Norbye




Method Summary
public static  voidaddNodesByType(Node root, int[] nodeIds, List<Node> result)
    
public static  intboundCaretOffset(CompilationInfo info, int caretOffset)
    
public static  booleancontainsOffset(Node node, int offset)
    
public static  intfindArgumentIndex(Node node, int offset)
     Look for the caret offset in the parameter list; return the index of the parameter that contains it.
public static  NodefindBlock(AstPath path)
    
public static  NodefindBySignature(Node root, String signature)
    
public static  ClassNodefindClass(AstPath path)
    
public static  ClassNodefindClassAtOffset(Node root, int offset)
    
public static  IScopingNodefindClassOrModule(AstPath path)
    
public static  NodefindDynamicScope(Node node, AstPath path)
    
public static  NodefindLocalScope(Node node, AstPath path)
    
public static  MethodDefNodefindMethod(Node node, String name, Arity arity)
    
public static  MethodDefNodefindMethod(AstPath path)
    
public static  MethodDefNodefindMethodAtOffset(Node root, int offset)
    
public static  intfindOffset(FileObject fo, String methodName)
    
public static  voidfindPrivateMethods(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  OffsetRangegetAliasNewRange(AliasNode node)
     Return the OffsetRange for an AliasNode that represents the new name portion.
public static  OffsetRangegetAliasOldRange(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  intgetAstOffset(CompilationInfo info, int lexOffset)
    
public static  OffsetRangegetAstOffsets(CompilationInfo info, OffsetRange lexicalRange)
    
public static  SymbolNode[]getAttrSymbols(Node node)
    
public static  StringgetCallName(Node node)
    
public static  OffsetRangegetCallRange(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  StringgetClassOrModuleName(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  StringgetDefName(Node node)
    
public static  ArgumentNodegetDefNameNode(MethodDefNode node)
    
public static  StringgetDefSignature(MethodDefNode node)
    
public static  NodegetForeignNode(IndexedElement o, Node[] foreignRootRet)
    
public static  StringgetFqn(Colon2Node c2n)
    
public static  StringgetFqnName(AstPath path)
    
public static  OffsetRangegetFunctionNameRange(Node node)
    
public static  OffsetRangegetLValueRange(AssignableNode node)
     Return a range that matches the lvalue for an assignment.
public static  StringgetMethodName(FileObject fo, int offset)
     Get the method name for the given offset - or null if it cannot be found.
public static  OffsetRangegetNameRange(Node node)
    
public static  RubyParseResultgetParseResult(CompilationInfo info)
    
public static  OffsetRangegetRange(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  NodegetRoot(CompilationInfo info)
    
public static  NodegetRoot(CompilationInfo info, String mimeType)
    
public static  NodegetRoot(ParserResult r)
    
public static  StringgetSuperclass(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  StringguessName(CompilationInfo info, OffsetRange lexRange, OffsetRange astRange)
    
public static  booleanisAttr(Node node)
    
public static  booleanisCall(Node node)
    
public static  booleanisCallFor(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  booleanisConstructorMethod(MethodDefNode node)
    



Method Detail
addNodesByType
public static void addNodesByType(Node root, int[] nodeIds, List<Node> result)(Code)
Collect nodes of the given types (node.nodeId==NodeTypes.x) under the given root



boundCaretOffset
public static int boundCaretOffset(CompilationInfo info, int caretOffset)(Code)



containsOffset
public static boolean containsOffset(Node node, int offset)(Code)
Return true iff the given node contains the given offset



findArgumentIndex
public static int findArgumentIndex(Node node, int offset)(Code)
Look for the caret offset in the parameter list; return the index of the parameter that contains it.



findBlock
public static Node findBlock(AstPath path)(Code)



findBySignature
public static Node findBySignature(Node root, String signature)(Code)
For the given signature, locating the corresponding Node within the tree that it corresponds to



findClass
public static ClassNode findClass(AstPath path)(Code)



findClassAtOffset
public static ClassNode findClassAtOffset(Node root, int offset)(Code)



findClassOrModule
public static IScopingNode findClassOrModule(AstPath path)(Code)



findDynamicScope
public static Node findDynamicScope(Node node, AstPath path)(Code)



findLocalScope
public static Node findLocalScope(Node node, AstPath path)(Code)



findMethod
public static MethodDefNode findMethod(Node node, String name, Arity arity)(Code)
Locate the method of the given name and arity



findMethod
public static MethodDefNode findMethod(AstPath path)(Code)



findMethodAtOffset
public static MethodDefNode findMethodAtOffset(Node root, int offset)(Code)



findOffset
public static int findOffset(FileObject fo, String methodName)(Code)



findPrivateMethods
public static void findPrivateMethods(Node clz, Set<Node> protectedMethods, Set<Node> privateMethods)(Code)
Get the private and protected methods in the given class



gatherDocumentation
public static List<String> gatherDocumentation(CompilationInfo info, BaseDocument baseDoc, Node node)(Code)
Get the rdoc documentation associated with the given node in the given document. The node must have position information that matches the source in the document.



getAliasNewRange
public static OffsetRange getAliasNewRange(AliasNode node)(Code)
Return the OffsetRange for an AliasNode that represents the new name portion.



getAliasOldRange
public static OffsetRange getAliasOldRange(AliasNode node)(Code)
Return the OffsetRange for an AliasNode that represents the old name portion.



getApplicableBlocks
public static List<Node> getApplicableBlocks(AstPath path, boolean includeNested)(Code)
Return all the blocknodes that apply to the given node. The outermost block is returned first.



getAstOffset
public static int getAstOffset(CompilationInfo info, int lexOffset)(Code)



getAstOffsets
public static OffsetRange getAstOffsets(CompilationInfo info, OffsetRange lexicalRange)(Code)



getAttrSymbols
public static SymbolNode[] getAttrSymbols(Node node)(Code)



getCallName
public static String getCallName(Node node)(Code)



getCallRange
public static OffsetRange getCallRange(Node node)(Code)
For CallNodes, the offset range for the AST node includes the entire parameter list. We want ONLY the actual call/operator name. So compute that on our own.



getClassOrModuleName
public static String getClassOrModuleName(IScopingNode node)(Code)



getClasses
public static List<ClassNode> getClasses(Node root)(Code)



getDefArgs
public static List<String> getDefArgs(MethodDefNode node, boolean namesOnly)(Code)
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. If false, include "*" and "&".



getDefName
public static String getDefName(Node node)(Code)



getDefNameNode
public static ArgumentNode getDefNameNode(MethodDefNode node)(Code)



getDefSignature
public static String getDefSignature(MethodDefNode node)(Code)



getForeignNode
public static Node getForeignNode(IndexedElement o, Node[] foreignRootRet)(Code)



getFqn
public static String getFqn(Colon2Node c2n)(Code)



getFqnName
public static String getFqnName(AstPath path)(Code)
Compute the module/class name for the given node path



getFunctionNameRange
public static OffsetRange getFunctionNameRange(Node node)(Code)



getLValueRange
public static OffsetRange getLValueRange(AssignableNode node)(Code)
Return a range that matches the lvalue for an assignment. The node must be namable.



getMethodName
public static String getMethodName(FileObject fo, int offset)(Code)
Get the method name for the given offset - or null if it cannot be found. This will initiate a new parse job if necessary.



getNameRange
public static OffsetRange getNameRange(Node node)(Code)



getParseResult
public static RubyParseResult getParseResult(CompilationInfo info)(Code)



getRange
public static OffsetRange getRange(Node node)(Code)
Return a range that matches the given node's source buffer range



getRequires
public static Set<String> getRequires(Node root)(Code)
Return the set of requires that are defined in this AST (no transitive closure though).



getRoot
public static Node getRoot(CompilationInfo info)(Code)



getRoot
public static Node getRoot(CompilationInfo info, String mimeType)(Code)



getRoot
public static Node getRoot(ParserResult r)(Code)



getSuperclass
public static String getSuperclass(ClassNode clz)(Code)



getUsedConstants
public static Set<String> getUsedConstants(RubyIndex index, AstPath path)(Code)



getUsedFields
public static Set<String> getUsedFields(RubyIndex index, AstPath path)(Code)



getUsedLocalNames
public static Set<String> getUsedLocalNames(AstPath path, Node closest)(Code)



getUsedMethods
public static Set<String> getUsedMethods(RubyIndex index, AstPath path)(Code)



guessName
public static String guessName(CompilationInfo info, OffsetRange lexRange, OffsetRange astRange)(Code)



isAttr
public static boolean isAttr(Node node)(Code)



isCall
public static boolean isCall(Node node)(Code)



isCallFor
public static boolean isCallFor(Node call, Arity callArity, Node method)(Code)
Return true iff the given call note can be considered a valid call of the given method.



isConstructorMethod
public static boolean isConstructorMethod(MethodDefNode node)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.