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 extends CollectionJ2MemberAndAccessorFactory {
11  
12      /**
13       * Creates a new CollectionJ2NoIndexMemberAndAccessorFactory.
14       * @param naming the java naming to use
15       */
16      public CollectionJ2NoIndexMemberAndAccessorFactory(JavaNaming naming) {
17          super(naming);
18      }
19  
20      /**
21       * {@inheritDoc}
22       * supresses the method creation
23       */
24      protected void createAddByIndexMethod(final CollectionInfo fieldInfo,  final JClass jClass) {
25          // do not create such method,
26      }
27  
28      /**
29       * {@inheritDoc}
30       * supresses the method creation
31       */
32      protected void createGetByIndexMethod(final CollectionInfo fieldInfo, final JClass jClass) {
33          // do not create such method
34      }
35  
36      /**
37       * {@inheritDoc}
38       * supresses the method creation
39       */
40      protected void createSetByIndexMethod(final CollectionInfo fieldInfo, final JClass jClass) {
41          // do not create such method
42      }
43  
44      /**
45       * {@inheritDoc}
46       * supresses the method creation
47       */
48      protected void createRemoveByIndexMethod(final CollectionInfo fieldInfo, final JClass jClass) {
49          // do not create such method
50      }
51      
52  }