001/* 002 * BioJava development code 003 * 004 * This code may be freely distributed and modified under the 005 * terms of the GNU Lesser General Public Licence. This should 006 * be distributed with the code. If you do not have a copy, 007 * see: 008 * 009 * http://www.gnu.org/copyleft/lesser.html 010 * 011 * Copyright for this code is held jointly by the individual 012 * authors. These should be listed in @author doc comments. 013 * 014 * For more information on the BioJava project and its aims, 015 * or to join the biojava-l mailing list, visit the home page 016 * at: 017 * 018 * http://www.biojava.org/ 019 * 020 */ 021package org.biojava.utils.bytecode; 022 023/** 024 * Wrap up details about a method in a Java class file 025 * 026 * @author Thomas Down 027 * @author Matthew Pocock 028 */ 029 030public interface CodeMethod { 031 /** 032 * The name of the method. 033 * 034 * @return the method name 035 */ 036 public String getName(); 037 038 /** 039 * The class that contains this method 040 * 041 * @return the containing class 042 */ 043 public CodeClass getContainingClass(); 044 045 /** 046 * The fully qualified name for this class 047 * 048 * @return the full name 049 */ 050 public String getFullName(); 051 052 /** 053 * A human-readable description of the class 054 * 055 * @return the class description 056 */ 057 public String getDescriptor(); 058 059 /** 060 * Get the modifiers, such as PUBLIC, ABSTRACT and so on 061 * 062 * @return the class modifiers 063 */ 064 public int getModifiers(); 065 066 /** 067 * Get the return type 068 * 069 * @return the return type 070 */ 071 public CodeClass getReturnType(); 072 073 /** 074 * Get the number of parameters taken by this method 075 * 076 * @return the number of parameters 077 */ 078 public int numParameters(); 079 080 /** 081 * Get the type of the parameter at a given position 082 * 083 * @param pos the position to fetch the parameter type for 084 * @return the type of the parameter at that position 085 */ 086 public CodeClass getParameterType(int pos); 087}