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


java.lang.Object
   xtc.typical.TypeMapper

TypeMapper
public class TypeMapper (Code)
Type to Java type mapper.
author:
   Laune Harris
version:
   $Revision: 1.56 $

Inner Class :class PatternMatchType

Field Summary
final public static  ObjectOBJECT
     The singleton object indicating an object.
final public static  ObjectPAIR_OF_OBJECT
     The singleton object indicating a pair of objects.
final protected  TreeFactoryfactory
     The tree factory.
protected  booleaninFunctionType
     Being processing a function type.
final public static  NodenameTupleT
     The tuple type of the tuple (name, string, string), used in namespace translation.
 Pair<String>nodeTypes
     A list of types that are nodes.
final protected  Stringprefix
    
final protected  StringprefixNoDot
     The prefix without a dot at the end.
final protected  booleanreplaceType
     The flag for replacing type with raw_type.
final protected  Runtimeruntime
     The runtime.
protected  HashMap<String, String>variableNames
    

Constructor Summary
public  TypeMapper(Runtime runtime, String prefix, boolean replaceType, Pair<String> nodeTypes)
     Create a new type mapper.

Method Summary
public  booleancontainsAny(Object o)
     Check if this type contains an any type.
Parameters:
  o - The type to test.
public static  StringgetAnnotatedString(Object o)
     Get annotated string from a type.
Parameters:
  o - The type to get the annotated string from.
public static  Pair<String>getAnnotatedStringList(Object o)
     Get annotated string from a type.
Parameters:
  o - The type to get the annotated string from.
public  ObjectgetBase(Object o)
     Get the base of a contstructed type.
Parameters:
  o - The type object.
public  List<String>getFieldNames(Object o)
     Get the list of field names from a record.
Parameters:
  o - The type object.
public  List<Node>getFieldTypeNodes(Object o)
     Get the field type nodes from a record.
Parameters:
  o - The type object.
public  List<String>getFieldTypes(Object o)
     Get the field types from a record.
Parameters:
  o - The type object.
public  List<Node>getMemberNodes(Object o)
     Get the member nodes from a constructor type.
Parameters:
  o - The type object.
public  List<Object>getMemberObjects(Object o)
     Get the members from a constructor type.
Parameters:
  o - The type object.
public  List<String>getMembers(Object o)
     Get the members from a constructor type.
Parameters:
  o - The type object.
public  List<Node>getParameterTypeNodes(Object o)
     Get the list of java type nodes from a types parameter list.
public  List<String>getParameterTypes(Object o)
     Get the list of java types from a types parameter list.
public  ObjectgetPatternMatchLeftType(Object o)
     Get the type of the left side of a pattern matching.
Parameters:
  o - The pattern match type.
public  ObjectgetPatternMatchRightType(Object o)
     Get the type of the left side of a pattern matching.
Parameters:
  o - The pattern match type.
public  StringgetReturnType(Object o)
     Get the the return type from a type.
Parameters:
  o - The type object.
public  NodegetReturnTypeNode(Object o)
     Get the the return type node from a type.
Parameters:
  o - The type object.
public  List<String>getTypeVariables(Object o)
    
public  booleanisFunctionType(Object o)
     Test if this type object is a function type.
Parameters:
  o - The type to test.
public  booleanisList(Object o)
     Test if a type is a list type.
Parameters:
  o - The type to test.
public  booleanisNode(Object o)
     Test if a type is a node.
public  booleanisVariable(Object o)
     Test if a type is a variable type.
Parameters:
  o - The type to test.
public  PatternMatchTypemakePatternMatchType(Object left, Object right)
     Make a pattern match type.
public  intprocessTypeVariables(Object o, int index)
    
public  NodetoTypeNode(Object o, boolean objectToWild)
    
public  StringtoTypeString(Object o)
     Print a type as a Java generic type.
Parameters:
  o - The type object.

Field Detail
OBJECT
final public static Object OBJECT(Code)
The singleton object indicating an object.



PAIR_OF_OBJECT
final public static Object PAIR_OF_OBJECT(Code)
The singleton object indicating a pair of objects.



factory
final protected TreeFactory factory(Code)
The tree factory.



inFunctionType
protected boolean inFunctionType(Code)
Being processing a function type.



nameTupleT
final public static Node nameTupleT(Code)
The tuple type of the tuple (name, string, string), used in namespace translation.



nodeTypes
Pair<String> nodeTypes(Code)
A list of types that are nodes.



prefix
final protected String prefix(Code)
The prefix of the types that belong to the xxxTypes.java file



prefixNoDot
final protected String prefixNoDot(Code)
The prefix without a dot at the end.



replaceType
final protected boolean replaceType(Code)
The flag for replacing type with raw_type.



runtime
final protected Runtime runtime(Code)
The runtime.



variableNames
protected HashMap<String, String> variableNames(Code)
The set of seen match conditions




Constructor Detail
TypeMapper
public TypeMapper(Runtime runtime, String prefix, boolean replaceType, Pair<String> nodeTypes)(Code)
Create a new type mapper.
Parameters:
  runtime - The runtime.
Parameters:
  prefix - The class name prefix.
Parameters:
  replaceType - The flag for replacing type with raw_type.




Method Detail
containsAny
public boolean containsAny(Object o)(Code)
Check if this type contains an any type.
Parameters:
  o - The type to test. true if this type contains an any type, false otherwise.



getAnnotatedString
public static String getAnnotatedString(Object o)(Code)
Get annotated string from a type.
Parameters:
  o - The type to get the annotated string from. The annotated string.



getAnnotatedStringList
public static Pair<String> getAnnotatedStringList(Object o)(Code)
Get annotated string from a type.
Parameters:
  o - The type to get the annotated string from. The annotated string.



getBase
public Object getBase(Object o)(Code)
Get the base of a contstructed type.
Parameters:
  o - The type object. The base type.



getFieldNames
public List<String> getFieldNames(Object o)(Code)
Get the list of field names from a record.
Parameters:
  o - The type object. The list of field names.



getFieldTypeNodes
public List<Node> getFieldTypeNodes(Object o)(Code)
Get the field type nodes from a record.
Parameters:
  o - The type object. The list of field type nodes.



getFieldTypes
public List<String> getFieldTypes(Object o)(Code)
Get the field types from a record.
Parameters:
  o - The type object. The list of field types.



getMemberNodes
public List<Node> getMemberNodes(Object o)(Code)
Get the member nodes from a constructor type.
Parameters:
  o - The type object. The list of member nodes.



getMemberObjects
public List<Object> getMemberObjects(Object o)(Code)
Get the members from a constructor type.
Parameters:
  o - The type object. The list of members.



getMembers
public List<String> getMembers(Object o)(Code)
Get the members from a constructor type.
Parameters:
  o - The type object. The list of members.



getParameterTypeNodes
public List<Node> getParameterTypeNodes(Object o)(Code)
Get the list of java type nodes from a types parameter list.
Parameters:
  o - The type object The list of java type nodes.



getParameterTypes
public List<String> getParameterTypes(Object o)(Code)
Get the list of java types from a types parameter list.
Parameters:
  o - The type object The list of java types.



getPatternMatchLeftType
public Object getPatternMatchLeftType(Object o)(Code)
Get the type of the left side of a pattern matching.
Parameters:
  o - The pattern match type. The left type.



getPatternMatchRightType
public Object getPatternMatchRightType(Object o)(Code)
Get the type of the left side of a pattern matching.
Parameters:
  o - The pattern match type. The left type.



getReturnType
public String getReturnType(Object o)(Code)
Get the the return type from a type.
Parameters:
  o - The type object. The Java Type of this return type.



getReturnTypeNode
public Node getReturnTypeNode(Object o)(Code)
Get the the return type node from a type.
Parameters:
  o - The type object. The Java type node of this return type.



getTypeVariables
public List<String> getTypeVariables(Object o)(Code)
Get type variables from a typical type
Parameters:
  o - The type to get type variables from A list of type variables



isFunctionType
public boolean isFunctionType(Object o)(Code)
Test if this type object is a function type.
Parameters:
  o - The type to test. true if function type, false otherwise.



isList
public boolean isList(Object o)(Code)
Test if a type is a list type.
Parameters:
  o - The type to test. true if this type is a list type, false otherwise.



isNode
public boolean isNode(Object o)(Code)
Test if a type is a node. The type object. true if node false otherwise.



isVariable
public boolean isVariable(Object o)(Code)
Test if a type is a variable type.
Parameters:
  o - The type to test. true if this type is a variable type, false otherwise.



makePatternMatchType
public PatternMatchType makePatternMatchType(Object left, Object right)(Code)
Make a pattern match type.
Parameters:
  left - The type of the left hand side.
Parameters:
  right - The type of the right hand side.



processTypeVariables
public int processTypeVariables(Object o, int index)(Code)
Preprocess type variables in function type
Parameters:
  o - The function type to process
Parameters:
  index - The starting index the number of type parameters



toTypeNode
public Node toTypeNode(Object o, boolean objectToWild)(Code)
Get a java type node from a typical type
Parameters:
  o - The typical type object
Parameters:
  objectToWild - To check if need to change Object to ? The corresponding java type node



toTypeString
public String toTypeString(Object o)(Code)
Print a type as a Java generic type.
Parameters:
  o - The type object. The JavaTypeString.



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.