• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 fields.
21  */
22 public interface FieldList
23 {
24     /**
25      * Get whether this instance is mutable. Note that the
26      * {@code FieldList} interface itself doesn't provide any means
27      * of mutation, but that doesn't mean that there isn't a non-interface
28      * way of mutating an instance.
29      *
30      * @return {@code true} iff this instance is somehow mutable
31      */
isMutable()32     public boolean isMutable();
33 
34     /**
35      * Get the number of fields in the list.
36      *
37      * @return the size
38      */
size()39     public int size();
40 
41     /**
42      * Get the {@code n}th field.
43      *
44      * @param n {@code n >= 0, n < size();} which field
45      * @return {@code non-null;} the field in question
46      */
get(int n)47     public Field get(int n);
48 }
49