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
17package signature.model.impl;
18
19import java.io.Serializable;
20
21import signature.model.IAnnotationElement;
22import signature.model.IAnnotationField;
23
24@SuppressWarnings("serial")
25public class SigAnnotationElement implements IAnnotationElement, Serializable {
26
27    private IAnnotationField declaringField;
28    private Object value;
29
30    public IAnnotationField getDeclaringField() {
31        return declaringField;
32    }
33
34    public void setDeclaringField(IAnnotationField declaringField) {
35        this.declaringField = declaringField;
36    }
37
38    public Object getValue() {
39        return value;
40    }
41
42    public void setValue(Object value) {
43        this.value = value;
44    }
45
46    @Override
47    public String toString() {
48        StringBuilder builder = new StringBuilder();
49        builder.append(getDeclaringField().getName());
50        builder.append(" = ");
51        builder.append(getValue());
52        return builder.toString();
53    }
54}
55