1 package com.sun.syndication.feed.synd;
2
3 import com.sun.syndication.feed.impl.ObjectBean;
4 import com.sun.syndication.feed.impl.CopyFromHelper;
5
6 import java.io.Serializable;
7 import java.util.Map;
8 import java.util.HashMap;
9 import java.util.Collections;
10
11
12
13
14 public class SyndEnclosureImpl implements Serializable,SyndEnclosure {
15 private ObjectBean _objBean;
16 private String _url;
17 private String _type;
18 private long _length;
19
20
21
22
23
24
25 public SyndEnclosureImpl() {
26 _objBean = new ObjectBean(SyndEnclosure.class,this);
27 }
28
29
30
31
32
33
34
35
36 public Object clone() throws CloneNotSupportedException {
37 return _objBean.clone();
38 }
39
40
41
42
43
44
45
46
47 public boolean equals(Object other) {
48 return _objBean.equals(other);
49 }
50
51
52
53
54
55
56
57
58
59 public int hashCode() {
60 return _objBean.hashCode();
61 }
62
63
64
65
66
67
68
69 public String toString() {
70 return _objBean.toString();
71 }
72
73
74
75
76
77
78
79 public String getUrl() {
80 return _url;
81 }
82
83
84
85
86
87
88
89 public void setUrl(String url) {
90 _url = url;
91 }
92
93
94
95
96
97
98
99 public long getLength() {
100 return _length;
101 }
102
103
104
105
106
107
108
109 public void setLength(long length) {
110 _length = length;
111 }
112
113
114
115
116
117
118
119 public String getType() {
120 return _type;
121 }
122
123
124
125
126
127
128
129 public void setType(String type) {
130 _type = type;
131 }
132
133 public Class getInterface() {
134 return SyndEnclosure.class;
135 }
136
137 public void copyFrom(Object obj) {
138 COPY_FROM_HELPER.copy(this,obj);
139 }
140
141 private static final CopyFromHelper COPY_FROM_HELPER;
142
143 static {
144 Map basePropInterfaceMap = new HashMap();
145 basePropInterfaceMap.put("url",String.class);
146 basePropInterfaceMap.put("type",String.class);
147 basePropInterfaceMap.put("length",Long.TYPE);
148
149 Map basePropClassImplMap = Collections.EMPTY_MAP;
150
151 COPY_FROM_HELPER = new CopyFromHelper(SyndEnclosure.class,basePropInterfaceMap,basePropClassImplMap);
152 }
153
154 }