13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.bcel.internal.classfile;
23
24 import java.io.DataInput;
25 import java.io.DataOutputStream;
26 import java.io.IOException;
27
28 import com.sun.org.apache.bcel.internal.Const;
29
30 /**
31 * Represents the default value of a annotation for a method info
32 *
33 * @version $Id: AnnotationDefault 1 2005-02-13 03:15:08Z dbrosius $
34 * @since 6.0
35 */
36 public class AnnotationDefault extends Attribute {
37
38 private ElementValue default_value;
39
40 /**
41 * @param name_index Index pointing to the name <em>Code</em>
42 * @param length Content length in bytes
43 * @param input Input stream
44 * @param constant_pool Array of constants
45 */
46 AnnotationDefault(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
47 this(name_index, length, (ElementValue) null, constant_pool);
48 default_value = ElementValue.readElementValue(input, constant_pool);
49 }
50
51 /**
52 * @param name_index Index pointing to the name <em>Code</em>
53 * @param length Content length in bytes
|
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.bcel.internal.classfile;
23
24 import java.io.DataInput;
25 import java.io.DataOutputStream;
26 import java.io.IOException;
27
28 import com.sun.org.apache.bcel.internal.Const;
29
30 /**
31 * Represents the default value of a annotation for a method info
32 *
33 * @since 6.0
34 */
35 public class AnnotationDefault extends Attribute {
36
37 private ElementValue default_value;
38
39 /**
40 * @param name_index Index pointing to the name <em>Code</em>
41 * @param length Content length in bytes
42 * @param input Input stream
43 * @param constant_pool Array of constants
44 */
45 AnnotationDefault(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool) throws IOException {
46 this(name_index, length, (ElementValue) null, constant_pool);
47 default_value = ElementValue.readElementValue(input, constant_pool);
48 }
49
50 /**
51 * @param name_index Index pointing to the name <em>Code</em>
52 * @param length Content length in bytes
|