View Javadoc
1   /*
2    * #%L
3    * EUGene :: EUGene
4    * %%
5    * Copyright (C) 2004 - 2012 CodeLutin Chatellier Eric
6    * %%
7    * This program is free software: you can redistribute it and/or modify
8    * it under the terms of the GNU Lesser General Public License as 
9    * published by the Free Software Foundation, either version 3 of the 
10   * License, or (at your option) any later version.
11   * 
12   * This program is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Lesser Public License for more details.
16   * 
17   * You should have received a copy of the GNU General Lesser Public 
18   * License along with this program.  If not, see
19   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
20   * #L%
21   */
22  
23  package org.nuiton.eugene.models.object;
24  
25  import java.util.Collection;
26  
27  /**
28   * Abstraction for the class node of object model trees.
29   * This object presents all information concerning the given class.
30   *
31   * Created: 14 janv. 2004
32   *
33   * @author Cédric Pineau - pineau@codelutin.com
34   */
35  public interface ObjectModelClass extends ObjectModelClassifier {
36  
37      /**
38       * Returns all parent classes for this class.
39       *
40       * @return a Collection containing all parent ObjectModelClass for this class.
41       */
42      Collection<ObjectModelClass> getSuperclasses();
43  
44      /**
45       * Returns all inner classes for this class.
46       *
47       * @return a Collection containing all inner ObjectModelClass for this class.
48       */
49      Collection<ObjectModelClassifier> getInnerClassifiers();
50  
51      /**
52       * Returns the discriminator for the given superclass.
53       * (name of the inheritance relation).
54       *
55       * @param superclass super class to get discriminator
56       * @return the discriminator for the given superclass as a String if it exists, null otherwise.
57       */
58      String getDiscriminator(ObjectModelClass superclass);
59  
60      /**
61       * Returns all known direct specialized classes for this class.
62       *
63       * @return a Collection containing all known direct specialized ObjectModelClass for this class.
64       */
65      Collection<ObjectModelClass> getSpecialisations();
66  
67      /**
68       * Returns all known direct specialized classes for this class for the
69       * specified discriminator.
70       *
71       * @param discriminator discriminator to get specialisations
72       * @return a Collection containing all known direct specialized
73       * ObjectModelClass for this class for the specified discriminator.
74       */
75      Collection<ObjectModelClass> getSpecialisations(String discriminator);
76  
77      /**
78       * Returns whether this class is abstract or not.
79       *
80       * @return a boolean indicating whether this class is abstract or not.
81       */
82      boolean isAbstract();
83  
84  //    /**
85  //    * Returns whether this class is inner an other class or not.
86  //    *
87  //    * @return a boolean indicating whether this class is inner an other class or not.
88  //    */
89  //    boolean isInner();
90  
91      /**
92       * Returns all operations defined on all Super class extended by this
93       * classifier, directly or indirectly. and all interface implemented by the
94       * super class.
95       *
96       * @param distinct if this boolean is true only distinct operation
97       *                 are add to list.
98       * @return a Collection of ObjectModelOperation
99       */
100     Collection<ObjectModelOperation> getAllSuperclassOperations(boolean distinct);
101 
102 } //ObjectModelClass