001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common Development
008: * and Distribution License("CDDL") (collectively, the "License"). You
009: * may not use this file except in compliance with the License. You can obtain
010: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
012: * language governing permissions and limitations under the License.
013: *
014: * When distributing the software, include this License Header Notice in each
015: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016: * Sun designates this particular file as subject to the "Classpath" exception
017: * as provided by Sun in the GPL Version 2 section of the License file that
018: * accompanied this code. If applicable, add the following below the License
019: * Header, with the fields enclosed by brackets [] replaced by your own
020: * identifying information: "Portions Copyrighted [year]
021: * [name of copyright owner]"
022: *
023: * Contributor(s):
024: *
025: * If you wish your version of this file to be governed by only the CDDL or
026: * only the GPL Version 2, indicate your decision by adding "[Contributor]
027: * elects to include this software in this distribution under the [CDDL or GPL
028: * Version 2] license." If you don't indicate a single choice of license, a
029: * recipient has the option to distribute your version of this file under
030: * either the CDDL, the GPL Version 2 or to extend the choice of license to
031: * its licensees as provided above. However, if you add GPL Version 2 code
032: * and therefore, elected the GPL Version 2 license, then the option applies
033: * only if the new code is made subject to such option by the copyright
034: * holder.
035: */
036:
037: package com.sun.tools.xjc.reader.xmlschema;
038:
039: import com.sun.tools.xjc.model.CElement;
040: import com.sun.xml.xsom.XSAnnotation;
041: import com.sun.xml.xsom.XSAttGroupDecl;
042: import com.sun.xml.xsom.XSAttributeDecl;
043: import com.sun.xml.xsom.XSAttributeUse;
044: import com.sun.xml.xsom.XSComplexType;
045: import com.sun.xml.xsom.XSContentType;
046: import com.sun.xml.xsom.XSElementDecl;
047: import com.sun.xml.xsom.XSFacet;
048: import com.sun.xml.xsom.XSIdentityConstraint;
049: import com.sun.xml.xsom.XSModelGroup;
050: import com.sun.xml.xsom.XSModelGroupDecl;
051: import com.sun.xml.xsom.XSNotation;
052: import com.sun.xml.xsom.XSParticle;
053: import com.sun.xml.xsom.XSSchema;
054: import com.sun.xml.xsom.XSSimpleType;
055: import com.sun.xml.xsom.XSWildcard;
056: import com.sun.xml.xsom.XSXPath;
057:
058: /**
059: * {@link ClassBinder} that delegates the call to another {@link ClassBinder}.
060: *
061: * @author Kohsuke Kawaguchi (kk@kohsuke.org)
062: */
063: abstract class ClassBinderFilter implements ClassBinder {
064: private final ClassBinder core;
065:
066: protected ClassBinderFilter(ClassBinder core) {
067: this .core = core;
068: }
069:
070: public CElement annotation(XSAnnotation xsAnnotation) {
071: return core.annotation(xsAnnotation);
072: }
073:
074: public CElement attGroupDecl(XSAttGroupDecl xsAttGroupDecl) {
075: return core.attGroupDecl(xsAttGroupDecl);
076: }
077:
078: public CElement attributeDecl(XSAttributeDecl xsAttributeDecl) {
079: return core.attributeDecl(xsAttributeDecl);
080: }
081:
082: public CElement attributeUse(XSAttributeUse xsAttributeUse) {
083: return core.attributeUse(xsAttributeUse);
084: }
085:
086: public CElement complexType(XSComplexType xsComplexType) {
087: return core.complexType(xsComplexType);
088: }
089:
090: public CElement schema(XSSchema xsSchema) {
091: return core.schema(xsSchema);
092: }
093:
094: public CElement facet(XSFacet xsFacet) {
095: return core.facet(xsFacet);
096: }
097:
098: public CElement notation(XSNotation xsNotation) {
099: return core.notation(xsNotation);
100: }
101:
102: public CElement simpleType(XSSimpleType xsSimpleType) {
103: return core.simpleType(xsSimpleType);
104: }
105:
106: public CElement particle(XSParticle xsParticle) {
107: return core.particle(xsParticle);
108: }
109:
110: public CElement empty(XSContentType xsContentType) {
111: return core.empty(xsContentType);
112: }
113:
114: public CElement wildcard(XSWildcard xsWildcard) {
115: return core.wildcard(xsWildcard);
116: }
117:
118: public CElement modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
119: return core.modelGroupDecl(xsModelGroupDecl);
120: }
121:
122: public CElement modelGroup(XSModelGroup xsModelGroup) {
123: return core.modelGroup(xsModelGroup);
124: }
125:
126: public CElement elementDecl(XSElementDecl xsElementDecl) {
127: return core.elementDecl(xsElementDecl);
128: }
129:
130: public CElement identityConstraint(
131: XSIdentityConstraint xsIdentityConstraint) {
132: return core.identityConstraint(xsIdentityConstraint);
133: }
134:
135: public CElement xpath(XSXPath xsxPath) {
136: return core.xpath(xsxPath);
137: }
138: }
|