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