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