KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > cojen > classfile > attribute > DeprecatedAttr


1 /*
2  * Copyright 2004 Brian S O'Neill
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 org.cojen.classfile.attribute;
18
19 import java.io.DataInput JavaDoc;
20 import java.io.IOException JavaDoc;
21 import org.cojen.classfile.Attribute;
22 import org.cojen.classfile.ConstantPool;
23
24 /**
25  * This class defines the Deprecated attribute introduced in JDK1.1.
26  *
27  * @author Brian S O'Neill
28  */

29 public class DeprecatedAttr extends Attribute {
30
31     public DeprecatedAttr(ConstantPool cp) {
32         super(cp, DEPRECATED);
33     }
34
35     public DeprecatedAttr(ConstantPool cp, String JavaDoc name) {
36         super(cp, name);
37     }
38
39     public DeprecatedAttr(ConstantPool cp, String JavaDoc name, int length, DataInput JavaDoc din)
40         throws IOException JavaDoc
41     {
42         super(cp, name);
43         if (length > 0) {
44             din.skipBytes(length);
45         }
46     }
47
48     public int getLength() {
49         return 0;
50     }
51 }
52
Popular Tags