View Javadoc
1   package org.exolab.castor.builder.factory;
2   
3   import org.castor.xml.JavaNaming;
4   import org.exolab.castor.builder.info.CollectionInfo;
5   import org.exolab.javasource.JClass;
6   
7   /**
8    * A Factory that avoids the creation of the index methods.
9    */
10  public class CollectionJ2NoIndexMemberAndAccessorFactory
11      extends CollectionJ2MemberAndAccessorFactory {
12  
13    /**
14     * Creates a new CollectionJ2NoIndexMemberAndAccessorFactory.
15     * 
16     * @param naming the java naming to use
17     */
18    public CollectionJ2NoIndexMemberAndAccessorFactory(JavaNaming naming) {
19      super(naming);
20    }
21  
22    /**
23     * {@inheritDoc} supresses the method creation
24     */
25    @Override
26    protected void createAddByIndexMethod(final CollectionInfo fieldInfo, final JClass jClass) {
27      // do not create such method,
28    }
29  
30    /**
31     * {@inheritDoc} supresses the method creation
32     */
33    @Override
34    protected void createGetByIndexMethod(final CollectionInfo fieldInfo, final JClass jClass,
35        boolean useJava50) {
36      // do not create such method
37    }
38  
39    /**
40     * {@inheritDoc} supresses the method creation
41     */
42    @Override
43    protected void createSetByIndexMethod(final CollectionInfo fieldInfo, final JClass jClass) {
44      // do not create such method
45    }
46  
47    /**
48     * {@inheritDoc} supresses the method creation
49     */
50    @Override
51    protected void createRemoveByIndexMethod(final CollectionInfo fieldInfo, final JClass jClass) {
52      // do not create such method
53    }
54  
55  }