    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 * @since 6.0
    031 */
    032public class RuntimeInvisibleAnnotations extends Annotations
    033{
    034    /**
    035     * @param name_index
    036     *            Index pointing to the name <em>Code</em>
    037     * @param length
    038     *            Content length in bytes
    039     * @param input
    040     *            Input stream
    041     * @param constant_pool
    042     *            Array of constants
    043     */
    044    public RuntimeInvisibleAnnotations(final int name_index, final int length, final DataInput input, final ConstantPool constant_pool)
    045            throws IOException
    046    {
    047        super(Const.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS, name_index, length, input, constant_pool, false);
    048    }
    049
    050    /**
    051     * @return deep copy of this attribute
    052     */
    053    @Override
    054    public Attribute copy(final ConstantPool constant_pool)
    055    {
    056        return (Attribute) clone();
    057    }
    058
    059    @Override
    060    public final void dump(final DataOutputStream dos) throws IOException
    061    {
    062        super.dump(dos);
    063        writeAnnotations(dos);
    064    }
    065}