1 /* 2 GenericDependency.java 3 Creation date : 20/06/2010 4 Copyright © Benjamin Croizet (graffity2199@yahoo.fr) 5 6 This program is free software; you can redistribute it and/or 7 modify it under the terms of the GNU General Public License 8 or GNU Lesser General Public License as published by the 9 Free Software Foundation; either version 3 of the License, 10 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 Public License for more details. 16 17 You should have received copies of the GNU General Public License 18 and GNU Lesser General Public License along with this program; 19 if not, write to the Free Software Foundation, Inc., 20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 http://www.fsf.org/licensing/licenses/gpl.html 22 http://www.gnu.org/licenses/lgpl.html 23 */ 24 25 package net.sourceforge.plantumldependency.cli.generic; 26 27 import java.io.Serializable; 28 29 import net.sourceforge.plantumldependency.cli.generic.type.DependencyType; 30 import net.sourceforge.plantumldependency.common.clone.DeepCloneable; 31 32 /** 33 * The interface which describes a generic abstract dependency, no matter the programming language. 34 * A dependency might be a class, an interface or an enumeration but it might not be determined when 35 * the abstract dependency is created. It is the underlying {@link DependencyType} which concretely 36 * determines its real type, such as class, enum or interface. An {@link GenericDependency} just 37 * mean that an object exists, but it only contains the minimum information we can have on this 38 * object at the beginning. All details are described by the underlying {@link DependencyType} when 39 * it is a concrete instance. 40 * 41 * @author Benjamin Croizet (<a href="mailto:graffity2199@yahoo.fr>graffity2199@yahoo.fr</a>) 42 * @since 1.0.0 43 * @version 1.3.0 44 */ 45 public interface GenericDependency extends Comparable < GenericDependency >, Serializable, 46 DeepCloneable < GenericDependency > { 47 48 /** 49 * Gets the underlying dependency type, which determines the real nature of the dependency. 50 * 51 * @return the {@link DependencyType} instance of the current abstract dependency. 52 * @since 1.0.0 53 */ 54 DependencyType getDependencyType(); 55 56 /** 57 * Gets the dependency full name, usually the package and the dependency name. 58 * <p> 59 * For instance, in java it can be :<br> 60 * <i>java.lang.String</i><br> 61 * <i>java.io.Serializable</i><br> 62 * <i>sun.font.Decoration</i> 63 * </p> 64 * 65 * @return the dependency full name. 66 * @since 1.0.0 67 */ 68 String getFullName(); 69 70 /** 71 * Gets the dependency name, usually the class name. 72 * <p> 73 * For instance, in java it can be :<br> 74 * <i>String</i><br> 75 * <i>Serializable</i><br> 76 * <i>Decoration</i> 77 * </p> 78 * 79 * @return the dependency name. 80 * @since 1.0.0 81 */ 82 String getName(); 83 84 /** 85 * Gets the dependency package name. 86 * <p> 87 * For instance, in java it can be :<br> 88 * <i>java.lang</i><br> 89 * <i>java.io</i><br> 90 * <i>sun.font</i> 91 * </p> 92 * 93 * @return the dependency package name. 94 * @since 1.0.0 95 */ 96 String getPackageName(); 97 98 /** 99 * Sets the underlying dependency type, which determines the real nature of the dependency. 100 * 101 * @param value 102 * the {@link DependencyType} instance of the current abstract dependency, mustn't be 103 * <code>null</code>. 104 * @since 1.0.0 105 */ 106 void setDependencyType(DependencyType value); 107 }