1 /*
2  * Copyright (C) 2007 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.dx.cf.iface;
18 
19 /**
20  * Interface for lists of methods.
21  */
22 public interface MethodList {
23     /**
24      * Get whether this instance is mutable. Note that the
25      * {@code MethodList} interface itself doesn't provide any means
26      * of mutation, but that doesn't mean that there isn't a non-interface
27      * way of mutating an instance.
28      *
29      * @return {@code true} iff this instance is somehow mutable
30      */
isMutable()31     public boolean isMutable();
32 
33     /**
34      * Get the number of methods in the list.
35      *
36      * @return the size
37      */
size()38     public int size();
39 
40     /**
41      * Get the {@code n}th method.
42      *
43      * @param n {@code n >= 0, n < size();} which method
44      * @return {@code non-null;} the method in question
45      */
get(int n)46     public Method get(int n);
47 }
48