1 /*
2  * Copyright (C) 2009 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 signature.model.impl;
18 
19 import java.io.Serializable;
20 import java.util.Set;
21 
22 import signature.converter.Visibility;
23 import signature.model.IApi;
24 import signature.model.IPackage;
25 
26 @SuppressWarnings("serial")
27 public class SigApi implements IApi, Serializable {
28 
29     private Set<IPackage> packages = Uninitialized.unset();
30     private String description;
31     private Visibility visibility;
32 
SigApi(String description, Visibility visibility)33     public SigApi(String description, Visibility visibility) {
34         this.description = description;
35         this.visibility = visibility;
36     }
37 
getName()38     public String getName() {
39         return description;
40     }
41 
setName(String description)42     public void setName(String description) {
43         this.description = description;
44     }
45 
getPackages()46     public Set<IPackage> getPackages() {
47         return packages;
48     }
49 
setPackages(Set<IPackage> packages)50     public void setPackages(Set<IPackage> packages) {
51         this.packages = packages;
52     }
53 
getVisibility()54     public Visibility getVisibility() {
55         return visibility;
56     }
57 
58     @Override
toString()59     public String toString() {
60         StringBuilder builder = new StringBuilder();
61         builder.append(getName());
62         return builder.toString();
63     }
64 }
65