001    package edu.rice.cs.cunit.classFile.attributes;
002    
003    import edu.rice.cs.cunit.classFile.constantPool.*;
004    import edu.rice.cs.cunit.classFile.attributes.visitors.IAttributeVisitor;
005    /**
006     * Represents the RuntimeVisibleParameterAnnotations attribute in a class file.
007     *
008     * @author Mathias Ricken
009     */
010    public class RuntimeVisibleParameterAnnotationsAttributeInfo extends AMultipleAnnotationsAttributeInfo {
011        /**
012         * Constructor.
013         *
014         * @param name attribute name
015         * @param data attribute data
016         * @param cp   constant pool
017         *
018         * @throws ClassFormatError
019         */
020        public RuntimeVisibleParameterAnnotationsAttributeInfo(AUTFPoolInfo name, byte[] data, ConstantPool cp) throws ClassFormatError {
021            super(name, data, cp);
022        }
023    
024        /**
025         * Execute a visitor on this attribute.
026         *
027         * @param visitor visitor
028         * @param param   visitor-specific parameter
029         *
030         * @return visitor-specific return value
031         */
032        public <R, D> R execute(IAttributeVisitor<R, D> visitor, D param) {
033            return visitor.runtimeVisibleParameterAnnotationsCase(this, param);
034        }
035    
036        /**
037         * Returns the name of the attribute as it appears in the class file.
038         *
039         * @return name of the attribute.
040         */
041        public static String getAttributeName() {
042            return "RuntimeVisibleParameterAnnotations";
043        }
044    
045        /**
046         * Return the name of the entity, i.e. "Parameter".
047         *
048         * @return name of tne entity
049         */
050        public String getEntityName() {
051            return "Parameter";
052        }
053    }