1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package org.apache.harmony.jpda.tests.framework.jdwp; 20 21 /** 22 * This class provides description of class method. 23 */ 24 public class Method { 25 private final long methodID; 26 private final String name; 27 private final String signature; 28 private final String genericSignature; 29 private final int modBits; 30 31 public Method(long methodID, String name, String signature, String genericSignature, 32 int modBits) { 33 this.methodID = methodID; 34 this.name = name; 35 this.signature = signature; 36 this.genericSignature = genericSignature; 37 this.modBits = modBits; 38 } 39 40 /** 41 * @return the method ID. 42 */ 43 public long getMethodID() { 44 return methodID; 45 } 46 47 /** 48 * @return the modifier bits. 49 */ 50 public int getModBits() { 51 return modBits; 52 } 53 54 /** 55 * @return the method name. 56 */ 57 public String getName() { 58 return name; 59 } 60 61 /** 62 * @return the method signature. 63 */ 64 public String getSignature() { 65 return signature; 66 } 67 68 /** 69 * @return the method generic signature (or an empty string if there is none). 70 */ 71 public String getGenericSignature() { 72 return genericSignature; 73 } 74 75 @Override 76 public String toString() { 77 return "" + methodID + " " + name + " " + signature + " " + modBits; 78 } 79 } 80