1 /* 2 * #%L 3 * EUGene :: EUGene 4 * %% 5 * Copyright (C) 2004 - 2010 CodeLutin 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 * ObjectModelClassifier. 29 * 30 * @author Cédric Pineau - pineau@codelutin.com 31 */ 32 public interface ObjectModelClassifier extends ObjectModelElement { 33 34 /** 35 * Returns the package name of this classifier. 36 * 37 * @return the package name of this classifier. 38 */ 39 String getPackageName(); 40 41 /** 42 * Returns the qualified name of this classifier. 43 * Class qualified name is composed of the package name and the classifier name. 44 * 45 * @return the qualified name of this classifier. 46 */ 47 String getQualifiedName(); 48 49 /** 50 * Returns all parent interfaces for this classifier. 51 * 52 * @return a Collection containing all parent ObjectModelInterface for this classifier. 53 */ 54 Collection<ObjectModelInterface> getInterfaces(); 55 56 /** 57 * Returns all operations defined on this classifier. 58 * 59 * @param name name of operation should be returned 60 * @return a Collection containing all ObjectModelOperation for this classifier. 61 * @see ObjectModelOperation 62 */ 63 Collection<ObjectModelOperation> getOperations(String name); 64 65 /** 66 * Returns all operations defined on this classifier. 67 * 68 * @return a Collection containing all ObjectModelOperation for this classifier. 69 * @see ObjectModelOperation 70 */ 71 Collection<ObjectModelOperation> getOperations(); 72 73 /** 74 * Returns all operations defined on all interfaces implemented by this 75 * classifier, directly or indirectly. 76 * 77 * @param distinct if this boolean is true only distinct operation 78 * are add to list. 79 * @return a Collection of ObjectModelOperation 80 */ 81 Collection<ObjectModelOperation> getAllInterfaceOperations( 82 boolean distinct); 83 84 /** 85 * Returns all operations defined on all implemented by this 86 * classifier, directly or indirectly. For interface this methode return 87 * the same result as getAllInterfaceOperations, for Class this 88 * method add all operation of SuperClass. 89 * 90 * @param distinct if this boolean is true only distinct operation 91 * are add to list. 92 * @return a Collection of ObjectModelOperation 93 */ 94 Collection<ObjectModelOperation> getAllOtherOperations( 95 boolean distinct); 96 97 /** 98 * Returns all attributes defined on this class. 99 * 100 * @return a Collection containing all ObjectModelAttribute for this class. 101 * @see ObjectModelAttribute 102 */ 103 Collection<ObjectModelAttribute> getAttributes(); 104 105 /** 106 * Returns the attribute corresponding to the given name, or null if the class contains no attribute for this name. 107 * 108 * @param attributeName attribute name 109 * @return the ObjectModelAttribute of the found attribute, or null if the class contains no attribute for this name. 110 */ 111 ObjectModelAttribute getAttribute(String attributeName); 112 113 /** 114 * Returns all attributes defined on all interfaces implemented by this 115 * classifier, directly or indirectly. 116 * 117 * @return a Collection of ObjectModelAttribute 118 */ 119 Collection<ObjectModelAttribute> getAllInterfaceAttributes(); 120 121 /** 122 * Returns all attributes defined on all super class extended by this 123 * classifier, directly or indirectly. 124 * 125 * @return a Collection of ObjectModelAttribute 126 */ 127 Collection<ObjectModelAttribute> getAllOtherAttributes(); 128 129 /** 130 * Returns all dependencies of this client classifier 131 * 132 * @return a Collection of ObjectModelDependency 133 */ 134 Collection<ObjectModelDependency> getDependencies(); 135 136 /** 137 * Return a dependency identifier by her name 138 * 139 * @param name of the dependency 140 * @return the dependency 141 */ 142 ObjectModelDependency getDependency(String name); 143 144 /** 145 * Returns whether this classifier is a class or not 146 * 147 * @return a boolean indicating whether this classifier is a class or not. 148 * @see ObjectModelClass 149 */ 150 boolean isClass(); 151 152 /** 153 * Returns whether this classifier is an interface or not 154 * 155 * @return a boolean indicating whether this classifier is an interface or not. 156 * @see ObjectModelInterface 157 */ 158 boolean isInterface(); 159 160 /** 161 * Returns whether this classifier is an enumeration or not 162 * 163 * @return a boolean indicating whether this classifier is an enumeration or not. 164 * @see ObjectModelEnumeration 165 */ 166 boolean isEnum(); 167 168 /** 169 * Returns whether this class is inner an other class or not. 170 * 171 * @return a boolean indicating whether this class is inner an other class or not. 172 */ 173 boolean isInner(); 174 175 } //ObjectModelClassifier