Java Doc for SimpleTypeBuilder.java in  » 6.0-JDK-Modules » jaxb-xjc » com » sun » tools » xjc » reader » xmlschema » 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 » 6.0 JDK Modules » jaxb xjc » com.sun.tools.xjc.reader.xmlschema 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.tools.xjc.reader.xmlschema.BindingComponent
      com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder

SimpleTypeBuilder
final public class SimpleTypeBuilder extends BindingComponent (Code)
Builds TypeUse from simple types.

This code consists of two main portions. The SimpleTypeBuilder.compose(XSSimpleType) method and SimpleTypeBuilder.composer forms an outer cycle, which gradually ascends the type inheritance chain until it finds the suitable binding. When it does this SimpleTypeBuilder.initiatingType is set to the type which started binding, so that we can refer to the actual constraint facets and such that are applicable on the type.

For each intermediate type in the chain, the SimpleTypeBuilder.find(XSSimpleType) method is used to find the binding on that type, sine the outer loop is doing the ascending, this method only sees if the current type has some binding available.

There is at least one ugly code that you need to aware of when you are modifying the code. See the documentation about "simple type customization at the point of reference."
author:
   Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)



Field Summary
final protected  BGMBuilderbuilder
    
final public static  Map<String, TypeUse>builtinConversions
    TypeUse s for the built-in types.
final public  XSSimpleTypeFunction<TypeUse>composer
    
final public  Stack<XSComponent>refererStack
     The component that is refering to the simple type which we are building.


Method Summary
public  TypeUsebuild(XSSimpleType type)
     Entry point from outside.
public  TypeUsebuildDef(XSSimpleType type)
     A version of the SimpleTypeBuilder.build(XSSimpleType) method used to bind the definition of a class generated from the given simple type.
public static  booleancanBeMappedToTypeSafeEnum(XSSimpleType type)
     Returns true if the given simple type can be mapped to a type-safe enum class.

JAXB spec places a restrictrion as to what type can be mapped to a type-safe enum.

 TypeUsecompose(XSSimpleType t)
     Recursively decend the type inheritance chain to find a binding.
public  XSComponentgetReferer()
    

Field Detail
builder
final protected BGMBuilder builder(Code)



builtinConversions
final public static Map<String, TypeUse> builtinConversions(Code)
TypeUse s for the built-in types. Read-only.



composer
final public XSSimpleTypeFunction<TypeUse> composer(Code)



refererStack
final public Stack<XSComponent> refererStack(Code)
The component that is refering to the simple type which we are building. This is ugly but necessary to support the customization of simple types at its point of reference. See my comment at the header of this class for details. UGLY: Implemented as a Stack of XSComponent to fix a bug





Method Detail
build
public TypeUse build(XSSimpleType type)(Code)
Entry point from outside. Builds a BGM type expression from a simple type schema component.
Parameters:
  type - the simple type to be bound.



buildDef
public TypeUse buildDef(XSSimpleType type)(Code)
A version of the SimpleTypeBuilder.build(XSSimpleType) method used to bind the definition of a class generated from the given simple type.



canBeMappedToTypeSafeEnum
public static boolean canBeMappedToTypeSafeEnum(XSSimpleType type)(Code)
Returns true if the given simple type can be mapped to a type-safe enum class.

JAXB spec places a restrictrion as to what type can be mapped to a type-safe enum. This method enforces this constraint.




compose
TypeUse compose(XSSimpleType t)(Code)
Recursively decend the type inheritance chain to find a binding.



getReferer
public XSComponent getReferer()(Code)



Methods inherited from com.sun.tools.xjc.reader.xmlschema.BindingComponent
final protected ClassSelector getClassSelector()(Code)(Java Doc)
final protected ErrorReporter getErrorReporter()(Code)(Java Doc)

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.