RuntimeVisibleAnnotations_attribute.java revision 2942:08092deced3f
178344Sobrien/* 278344Sobrien * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. 398184Sgordon * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 478344Sobrien * 578344Sobrien * This code is free software; you can redistribute it and/or modify it 678344Sobrien * under the terms of the GNU General Public License version 2 only, as 7240336Sobrien * published by the Free Software Foundation. Oracle designates this 8136224Smtm * particular file as subject to the "Classpath" exception as provided 978344Sobrien * by Oracle in the LICENSE file that accompanied this code. 1078344Sobrien * 1178344Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT 1278344Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13230099Sdougb * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1478344Sobrien * version 2 for more details (a copy is included in the LICENSE file that 1578344Sobrien * accompanied this code). 1678344Sobrien * 1778344Sobrien * You should have received a copy of the GNU General Public License version 1878344Sobrien * 2 along with this work; if not, write to the Free Software Foundation, 1978344Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2078344Sobrien * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26package com.sun.tools.classfile; 27 28import java.io.IOException; 29 30/** 31 * See JVMS, section 4.8.16. 32 * 33 * <p><b>This is NOT part of any supported API. 34 * If you write code that depends on this, you do so at your own risk. 35 * This code and its internal interfaces are subject to change or 36 * deletion without notice.</b> 37 */ 38public class RuntimeVisibleAnnotations_attribute extends RuntimeAnnotations_attribute { 39 RuntimeVisibleAnnotations_attribute(ClassReader cr, int name_index, int length) 40 throws IOException, Annotation.InvalidAnnotation { 41 super(cr, name_index, length); 42 } 43 44 public RuntimeVisibleAnnotations_attribute(ConstantPool cp, Annotation[] annotations) 45 throws ConstantPoolException { 46 this(cp.getUTF8Index(Attribute.RuntimeVisibleAnnotations), annotations); 47 } 48 49 public RuntimeVisibleAnnotations_attribute(int name_index, Annotation[] annotations) { 50 super(name_index, annotations); 51 } 52 53 public <R, P> R accept(Visitor<R, P> visitor, P p) { 54 return visitor.visitRuntimeVisibleAnnotations(this, p); 55 } 56} 57