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 import java.util.Set; 27 28 /** 29 * Abstraction for the operation node of object model trees. 30 * This object presents all information concerning the given operation. 31 * 32 * Created: 14 janv. 2004 33 * 34 * @author Cédric Pineau - pineau@codelutin.com 35 */ 36 public interface ObjectModelOperation extends ObjectModelElement { 37 38 /** 39 * Returns the return type of this operation. 40 * 41 * @return the return type of this operation. 42 */ 43 String getReturnType(); 44 45 /** 46 * Returns the visibility of this operation. 47 * Possible values includes {@code public}, {@code protected} and {@code private}. 48 * 49 * @return the visibility of this operation. 50 */ 51 String getVisibility(); 52 53 /** 54 * Returns whether this operation is abstract or not. 55 * 56 * @return a boolean indicating whether this operation is abstract or not. 57 */ 58 boolean isAbstract(); 59 60 /** 61 * Returns all parameters defined on this operation. 62 * 63 * @return a Collection containing all parameters defined on this operation. 64 * @see ObjectModelParameter 65 */ 66 Collection<ObjectModelParameter> getParameters(); 67 68 /** 69 * Return the return parameter of the operation 70 * 71 * @return an ObjectModelParameter representing the return parameter 72 */ 73 ObjectModelParameter getReturnParameter(); 74 75 // /** 76 // * In implementation you must write a good equals method 77 // */ 78 // boolean equals(Object o); 79 80 /** 81 * Returns all exception qualified names thrown by this operation 82 * (as strings) 83 * 84 * @return a Set containing the exceptions strings 85 */ 86 Set<String> getExceptions(); 87 88 /** 89 * Return body of the operation (source code) 90 * 91 * @return body of the operation (source code) 92 */ 93 String getBodyCode(); 94 95 } //ObjectModelOperation