KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > xml > binding > DelegatingObjectModelProvider


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.xml.binding;
8
9 /**
10  * todo come up with a nicer class name
11  *
12  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
13  * @version <tt>$Revision: 1.2.2.5 $</tt>
14  */

15 public class DelegatingObjectModelProvider
16    implements GenericObjectModelProvider
17 {
18    private final ObjectModelProvider provider;
19
20    public DelegatingObjectModelProvider(ObjectModelProvider provider)
21    {
22       this.provider = provider;
23    }
24
25    public Object JavaDoc getChildren(Object JavaDoc o, String JavaDoc namespaceURI, String JavaDoc localName)
26    {
27       return AbstractMarshaller.provideChildren(provider, o, namespaceURI, localName);
28    }
29
30    public Object JavaDoc getElementValue(Object JavaDoc o, String JavaDoc namespaceURI, String JavaDoc localName)
31    {
32       return AbstractMarshaller.provideValue(provider, o, namespaceURI, localName);
33    }
34
35    public Object JavaDoc getAttributeValue(Object JavaDoc o, String JavaDoc namespaceURI, String JavaDoc localName)
36    {
37       return AbstractMarshaller.provideAttributeValue(provider, o, namespaceURI, localName);
38    }
39
40    public Object JavaDoc getRoot(Object JavaDoc o, String JavaDoc namespaceURI, String JavaDoc localName)
41    {
42       return provider.getRoot(o, namespaceURI, localName);
43    }
44 }
45
Popular Tags