    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *      http://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 *  Unless required by applicable law or agreed to in writing, software
    012 *  distributed under the License is distributed on an "AS IS" BASIS,
    013 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 *  See the License for the specific language governing permissions and
    015 *  limitations under the License.
    016 *
    017 */
    018package org.apache.bcel.classfile;
    019
    020import java.io.DataInput;
    021import java.io.DataOutputStream;
    022import java.io.IOException;
    023
    024import org.apache.bcel.Const;
    025
    026/**
    027 * represents an annotation that is represented in the class file but is not
    028 * provided to the JVM.
    029 *
    030 * @version $Id: RuntimeInvisibleAnnotations
    031 * @since 6.0
    032 */
    033public class RuntimeInvisibleAnnotations extends Annotations
    034{
    035    /**
    036     * @param name_index
    037     *            Index pointing to the name <em>Code</em>
    038     * @param length
    039     *            Content length in bytes
    040     * @param input
    041     *            Input stream
    042     * @param constant_pool
    043     *            Array of constants
    044     */
    045    public RuntimeInvisibleAnnotations(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool)
    046            throws IOException
    047    {
    048        super(Const.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS, name_index, length, input, constant_pool, false);
    049    }
    050
    051    /**
    052     * @return deep copy of this attribute
    053     */
    054    @Override
    055    public Attribute copy(final ConstantPool constant_pool)
    056    {
    057        return (Attribute) clone();
    058    }
    059
    060    @Override
    061    public final void dump(final DataOutputStream dos) throws IOException
    062    {
    063        super.dump(dos);
    064        writeAnnotations(dos);
    065    }
    066}