Java Doc for Utilities.java in  » Parser » Rats-Parser-Generators » xtc » lang » jeannie » 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 » Parser » Rats Parser Generators » xtc.lang.jeannie 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   xtc.lang.jeannie.Utilities

Utilities
final public class Utilities (Code)
Static helper routines related to JNI and Jeannie. This is a good place to put code that is useful for more than one visitor.
author:
   Martin Hirzel
version:
   $Revision: 1.21 $

Inner Class :static class MiniVisitor_containsCToJavaTransition extends Visitor
Inner Class :static class MiniVisitor_containsJavaToCTransition extends Visitor
Inner Class :static class MiniVisitor_findScopeBoundaries extends Visitor
Inner Class :static class MiniVisitor_getSimpleDeclarators extends Visitor
Inner Class :static class MiniVisitor_getTopLevelDeclarations extends Visitor

Field Summary
final public static  Set<String>EMPTY_SET
    


Method Summary
public static  Cc()
    
public static  StringcAstToString(Node ast)
     Don't use this method gratuitously.
public static  TypecPtrToBaseType(Type cPtrType)
    
public static  GNodecStringToAst(String production, String code)
    
public static  GNodecStringToAst(String production, String code, Set<String> typedefs)
    
public static  TypecStringToType(String code)
    
public static  TypecStringToType(String code, Set<String> typedefs)
    
public static  GNodecTypeToAst(Type type, String id, String production)
    
public static  TypecTypeToJavaType(SymbolTable tab, Runtime runtime, Node n, Type cType)
    
public static  StringcTypeToString(Type type)
    
public static  StringcTypeToString(Type type, String id)
    
public static  booleancontainsCToJavaTransition(Node n)
    
public static  booleancontainsJavaToCTransition(GNode n)
    
public static  StringcopyDropAuto(String string)
    
public static  TypecurrentFunctionOrMethod(SymbolTable tab)
    
public static  StringdebuggerAstToString(GNode ast)
    
public static  DebuggerSymbolMapperdebuggerNewSymbolMapper()
    
public static  ObjectdebuggerParseAndAnalyze(String language, String input, DebuggerSymbolMapper mapper)
     Parse the input as a debugger command, and analyze the resulting AST.
public static  GNodedebuggerStringToAst(String language, String input)
    
public static  voiddumpLineMarkers(Set<LineMarker> ms, int limit)
    
public static  TypegetJavaClassOrInterfaceT(Type t)
    
public static  StringgetSimpleDeclarator(GNode declNode)
    
public static  Set<String>getSimpleDeclarators(GNode declNode)
    
public static  booleanhasTypedefName(Type t, String name)
    
public static  booleanisJavaEntity(Type e)
    
public static  booleanisPtrChar(Type t)
    
public static  booleanisPtrTypedef(Type t, String typedefName)
    
public static  StringjavaAstToString(Node ast)
    
public static  booleanjavaIsStaticMethod(GNode n)
    
public static  booleanjavaIsVoidMethod(GNode n)
    
public static  StringjavaTypeToApiType(Type type)
    
public static  StringjavaTypeToApiType(Type type, boolean upcase, boolean arrays)
    
public static  TypejavaTypeToCType(SymbolTable tab, Runtime runtime, Node n, Type jType, boolean keepIfClassOrInterface)
    
public static  StringjeannieAstToString(GNode ast, String language)
    
public static  GNodejeannieStringToAst(String production, String language, String code)
    
public static  GNodejeannieStringToAst(String production, String language, String escaped, boolean simple)
    
public static  StringjniMangledName(String name)
     Part of name of C function implementing Java method as expected by linker, see JNI Specification §11.3.
public static  StringjniMangledName(SymbolTable tab, Type type)
    
public static  RuntimenewRuntime()
    
static  voidprintLocalVariableMap(PrintWriter out, Node root, SymbolTable tab, CodeGenerator.Substitutions cSubstitutions, CodeGenerator.Substitutions javaSubstitutions)
    
static  voidprintLocalVariableMap_helper(PrintWriter out, SymbolTable tab, MiniVisitor_findScopeBoundaries boundaries, String language, CodeGenerator.Substitutions substitutions)
    
public static  voidprintTopLevelDeclarations(PrintWriter out, Node root)
    
public static  TypepureCType(SymbolTable tab, Runtime runtime, Type javaOrCType)
    
public static  StringqualifiedIdentifierToString(GNode n)
    
public static  TypereturnType(Type functionOrMethod)
    
public static  Set<String>standardJniTypeDefs()
    
public static  Set<String>stringSet(Object s)
    
public static  StringstringSetToString(Set<String> s)
    
public static  Set<String>typedefs(Type r)
    
public static  StringupcaseFirstLetter(String s)
    

Field Detail
EMPTY_SET
final public static Set<String> EMPTY_SET(Code)





Method Detail
c
public static C c()(Code)



cAstToString
public static String cAstToString(Node ast)(Code)
Don't use this method gratuitously. Originally, I used this to serialize ASTs into strings, then concatenated the strings into more code, then reparsed the result to a larger AST. But that is not only slow, it is also brittle, since the same typedefs must be available during both parses. Chances are you can use the ast directly as a parameter to an AST factory generated by FactoryFactory.



cPtrToBaseType
public static Type cPtrToBaseType(Type cPtrType)(Code)



cStringToAst
public static GNode cStringToAst(String production, String code)(Code)



cStringToAst
public static GNode cStringToAst(String production, String code, Set<String> typedefs)(Code)



cStringToType
public static Type cStringToType(String code)(Code)



cStringToType
public static Type cStringToType(String code, Set<String> typedefs)(Code)



cTypeToAst
public static GNode cTypeToAst(Type type, String id, String production)(Code)



cTypeToJavaType
public static Type cTypeToJavaType(SymbolTable tab, Runtime runtime, Node n, Type cType)(Code)



cTypeToString
public static String cTypeToString(Type type)(Code)



cTypeToString
public static String cTypeToString(Type type, String id)(Code)



containsCToJavaTransition
public static boolean containsCToJavaTransition(Node n)(Code)



containsJavaToCTransition
public static boolean containsJavaToCTransition(GNode n)(Code)



copyDropAuto
public static String copyDropAuto(String string)(Code)



currentFunctionOrMethod
public static Type currentFunctionOrMethod(SymbolTable tab)(Code)



debuggerAstToString
public static String debuggerAstToString(GNode ast)(Code)



debuggerNewSymbolMapper
public static DebuggerSymbolMapper debuggerNewSymbolMapper()(Code)



debuggerParseAndAnalyze
public static Object debuggerParseAndAnalyze(String language, String input, DebuggerSymbolMapper mapper)(Code)
Parse the input as a debugger command, and analyze the resulting AST. If either the parse or the analysis fails, return a message String. If neither fails, return an AST Node. If the input contains an embedded expression, the language argument determines whether it is "C" or "Java". The analyzer annotates each node in the AST with the language for that node. It also looks up variables and annotates them with their remapping based on the current file and line number, where available.



debuggerStringToAst
public static GNode debuggerStringToAst(String language, String input) throws Exception(Code)



dumpLineMarkers
public static void dumpLineMarkers(Set<LineMarker> ms, int limit)(Code)



getJavaClassOrInterfaceT
public static Type getJavaClassOrInterfaceT(Type t)(Code)



getSimpleDeclarator
public static String getSimpleDeclarator(GNode declNode)(Code)



getSimpleDeclarators
public static Set<String> getSimpleDeclarators(GNode declNode)(Code)



hasTypedefName
public static boolean hasTypedefName(Type t, String name)(Code)



isJavaEntity
public static boolean isJavaEntity(Type e)(Code)



isPtrChar
public static boolean isPtrChar(Type t)(Code)



isPtrTypedef
public static boolean isPtrTypedef(Type t, String typedefName)(Code)



javaAstToString
public static String javaAstToString(Node ast)(Code)



javaIsStaticMethod
public static boolean javaIsStaticMethod(GNode n)(Code)



javaIsVoidMethod
public static boolean javaIsVoidMethod(GNode n)(Code)



javaTypeToApiType
public static String javaTypeToApiType(Type type)(Code)



javaTypeToApiType
public static String javaTypeToApiType(Type type, boolean upcase, boolean arrays)(Code)



javaTypeToCType
public static Type javaTypeToCType(SymbolTable tab, Runtime runtime, Node n, Type jType, boolean keepIfClassOrInterface)(Code)



jeannieAstToString
public static String jeannieAstToString(GNode ast, String language)(Code)



jeannieStringToAst
public static GNode jeannieStringToAst(String production, String language, String code)(Code)



jeannieStringToAst
public static GNode jeannieStringToAst(String production, String language, String escaped, boolean simple) throws Exception(Code)



jniMangledName
public static String jniMangledName(String name)(Code)
Part of name of C function implementing Java method as expected by linker, see JNI Specification §11.3.



jniMangledName
public static String jniMangledName(SymbolTable tab, Type type)(Code)



newRuntime
public static Runtime newRuntime()(Code)



printLocalVariableMap
static void printLocalVariableMap(PrintWriter out, Node root, SymbolTable tab, CodeGenerator.Substitutions cSubstitutions, CodeGenerator.Substitutions javaSubstitutions)(Code)



printLocalVariableMap_helper
static void printLocalVariableMap_helper(PrintWriter out, SymbolTable tab, MiniVisitor_findScopeBoundaries boundaries, String language, CodeGenerator.Substitutions substitutions)(Code)



printTopLevelDeclarations
public static void printTopLevelDeclarations(PrintWriter out, Node root)(Code)



pureCType
public static Type pureCType(SymbolTable tab, Runtime runtime, Type javaOrCType)(Code)



qualifiedIdentifierToString
public static String qualifiedIdentifierToString(GNode n)(Code)



returnType
public static Type returnType(Type functionOrMethod)(Code)



standardJniTypeDefs
public static Set<String> standardJniTypeDefs()(Code)



stringSet
public static Set<String> stringSet(Object s)(Code)



stringSetToString
public static String stringSetToString(Set<String> s)(Code)



typedefs
public static Set<String> typedefs(Type r)(Code)



upcaseFirstLetter
public static String upcaseFirstLetter(String s)(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.