Java Doc for ModelBuilder.java in  » 6.0-JDK-Modules » jaxb-impl » com » sun » xml » bind » v2 » model » impl » 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 impl » com.sun.xml.bind.v2.model.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.xml.bind.v2.model.impl.ModelBuilder

ModelBuilder
public class ModelBuilder (Code)
Builds a TypeInfoSet (a set of JAXB properties) by using ElementInfoImpl and ClassInfoImpl . from annotated Java classes.

This class uses Navigator and AnnotationReader to work with arbitrary annotation source and arbitrary Java model. For this purpose this class is parameterized.
author:
   Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)



Field Summary
final public  StringdefaultNsUri
     JAXB doesn't want to use namespaces unless we are told to, but WS-I BP conformace requires JAX-RPC to always use a non-empty namespace URI.
public  booleanhasSwaRef
     Set to true if the model includes XmlAttachmentRef .
final public  Navigator<T, C, F, M>nav
    
final public  AnnotationReader<T, C, F, M>reader
    
final  Map<String, RegistryInfoImpl<T, C, F, M>>registries
     Packages whose registries are already added.
final  TypeInfoSetImpl<T, C, F, M>typeInfoSet
    TypeInfo s that are built will go into this set.

Constructor Summary
public  ModelBuilder(AnnotationReader<T, C, F, M> reader, Navigator<T, C, F, M> navigator, Map<C, C> subclassReplacements, String defaultNamespaceRemap)
    

Method Summary
public  RegistryInfo<T, C>addRegistry(C registryClass, Locatable upstream)
     Visits a class with XmlRegistry and records all the element mappings in it.
protected  ArrayInfoImpl<T, C, F, M>createArrayInfo(Locatable upstream, T arrayType)
    
protected  ClassInfoImpl<T, C, F, M>createClassInfo(C clazz, Locatable upstream)
    
protected  ElementInfoImpl<T, C, F, M>createElementInfo(RegistryInfoImpl<T, C, F, M> registryInfo, M m)
    
protected  EnumLeafInfoImpl<T, C, F, M>createEnumLeafInfo(C clazz, Locatable upstream)
    
protected  TypeInfoSetImpl<T, C, F, M>createTypeInfoSet()
    
public  NonElement<T, C>getClassInfo(C clazz, Locatable upstream)
     Builds a JAXB ClassInfo model from a given class declaration and adds that to this model owner.
public  NonElement<T, C>getClassInfo(C clazz, boolean searchForSuperClass, Locatable upstream)
     For limited cases where the caller needs to search for a super class.
public  RegistryInfo<T, C>getRegistry(String packageName)
     Gets a RegistryInfo for the given package.
public  NonElement<T, C>getTypeInfo(T t, Locatable upstream)
     Have the builder recognize the type (if it hasn't done so yet), and returns a NonElement that represents it.
public  NonElement<T, C>getTypeInfo(Ref<T, C> ref)
     This method is used to add a root reference to a model.
public  booleanisReplaced(C sc)
    
public  TypeInfoSet<T, C, F, M>link()
     Called after all the classes are added to the type set to "link" them together.
final public  voidreportError(IllegalAnnotationException e)
    
public  voidsetErrorHandler(ErrorHandler errorHandler)
     Sets the error handler that receives errors discovered during the model building.

Field Detail
defaultNsUri
final public String defaultNsUri(Code)
JAXB doesn't want to use namespaces unless we are told to, but WS-I BP conformace requires JAX-RPC to always use a non-empty namespace URI. (see http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#WSDLTYPES R2105)

To work around this issue, we allow the use of the empty namespaces to be replaced by a particular designated namespace URI.

This field keeps the value of that replacing namespace URI. When there's no replacement, this field is set to "".




hasSwaRef
public boolean hasSwaRef(Code)
Set to true if the model includes XmlAttachmentRef . JAX-WS needs to know this information.



nav
final public Navigator<T, C, F, M> nav(Code)



reader
final public AnnotationReader<T, C, F, M> reader(Code)



registries
final Map<String, RegistryInfoImpl<T, C, F, M>> registries(Code)
Packages whose registries are already added.



typeInfoSet
final TypeInfoSetImpl<T, C, F, M> typeInfoSet(Code)
TypeInfo s that are built will go into this set.




Constructor Detail
ModelBuilder
public ModelBuilder(AnnotationReader<T, C, F, M> reader, Navigator<T, C, F, M> navigator, Map<C, C> subclassReplacements, String defaultNamespaceRemap)(Code)




Method Detail
addRegistry
public RegistryInfo<T, C> addRegistry(C registryClass, Locatable upstream)(Code)
Visits a class with XmlRegistry and records all the element mappings in it.



createArrayInfo
protected ArrayInfoImpl<T, C, F, M> createArrayInfo(Locatable upstream, T arrayType)(Code)



createClassInfo
protected ClassInfoImpl<T, C, F, M> createClassInfo(C clazz, Locatable upstream)(Code)



createElementInfo
protected ElementInfoImpl<T, C, F, M> createElementInfo(RegistryInfoImpl<T, C, F, M> registryInfo, M m) throws IllegalAnnotationException(Code)



createEnumLeafInfo
protected EnumLeafInfoImpl<T, C, F, M> createEnumLeafInfo(C clazz, Locatable upstream)(Code)



createTypeInfoSet
protected TypeInfoSetImpl<T, C, F, M> createTypeInfoSet()(Code)



getClassInfo
public NonElement<T, C> getClassInfo(C clazz, Locatable upstream)(Code)
Builds a JAXB ClassInfo model from a given class declaration and adds that to this model owner.

Return type is either ClassInfo or LeafInfo (for types like String or Enum -derived ones)




getClassInfo
public NonElement<T, C> getClassInfo(C clazz, boolean searchForSuperClass, Locatable upstream)(Code)
For limited cases where the caller needs to search for a super class. This is necessary because we don't want ModelBuilder.subclassReplacements to kick in for the super class search, which will cause infinite recursion.



getRegistry
public RegistryInfo<T, C> getRegistry(String packageName)(Code)
Gets a RegistryInfo for the given package. null if no registry exists for the package.unlike other getXXX methods on this class,this method is side-effect free.



getTypeInfo
public NonElement<T, C> getTypeInfo(T t, Locatable upstream)(Code)
Have the builder recognize the type (if it hasn't done so yet), and returns a NonElement that represents it. always non-null.



getTypeInfo
public NonElement<T, C> getTypeInfo(Ref<T, C> ref)(Code)
This method is used to add a root reference to a model.



isReplaced
public boolean isReplaced(C sc)(Code)



link
public TypeInfoSet<T, C, F, M> link()(Code)
Called after all the classes are added to the type set to "link" them together.

Don't expose implementation classes in the signature. fully built TypeInfoSet that represents the model,or null if there was an error.




reportError
final public void reportError(IllegalAnnotationException e)(Code)



setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)(Code)
Sets the error handler that receives errors discovered during the model building.
Parameters:
  errorHandler - can be null.



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)

w_ww__.__j_av___a_2_s___.com_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.