KickJava   Java API By Example, From Geeks To Geeks.

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


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 corresponds to the Synthetic_attribute structure introduced in
26  * JDK1.1. It is not defined in the first edition of
27  * <i>The Java Virual Machine Specification</i>.
28  *
29  * @author Brian S O'Neill
30  */

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