01: /*
02: * Copyright 2004 Brian S O'Neill
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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;
20: import java.io.IOException;
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 name) {
38: super (cp, name);
39: }
40:
41: public SyntheticAttr(ConstantPool cp, String name, int length,
42: DataInput din) throws IOException {
43: super (cp, name);
44: if (length > 0) {
45: din.skipBytes(length);
46: }
47: }
48:
49: public int getLength() {
50: return 0;
51: }
52: }
|