View Javadoc
1   /*
2    * Copyright 2007 Werner Guttmann
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.exolab.castor.builder.conflict.strategy;
17  
18  
19  import org.exolab.castor.builder.SourceGenerator;
20  import org.exolab.castor.xml.schema.Annotated;
21  import org.exolab.javasource.JClass;
22  
23  /**
24   * Class name conflict resolver.
25   * 
26   * @author <a href="mailto:werner DOT guttmann AT gmx DOT net">Werner Guttmann</a>
27   */
28  public interface ClassNameConflictResolver {
29  
30      /**
31       * Changes the JClass' internal class name, as a result of an XPATH
32       * expression uniquely identifying an XML artefact within an XML schema.
33       * 
34       * @param jClass
35       *            The {@link JClass} instance whose local name should be
36       *            changed.
37       * @param xpath
38       *            XPATH expression used to defer the new local class name
39       * @param typedXPath
40       *            XPATH expression used to defer the new local class name
41       * @param annotated {@link Annotated} instance
42       */
43      void changeClassInfoAsResultOfConflict(final JClass jClass,
44              final String xpath, String typedXPath, Annotated annotated);
45  
46      /**
47       * Sets the calling {@link SourceGenerator} instance.
48       * @param sourceGenerator The calling {@link SourceGenerator} instance.
49       */
50      void setSourceGenerator(final SourceGenerator sourceGenerator);
51  
52  }