public static AbstractAttribute loadElement(DataInputStream mainInput, LinkedList<CONSTANTPoolElement> pool) 
            throws IOException, FrameException
    {
        int attr_name_index = mainInput.readUnsignedShort(); // (short)
        int attr_len = mainInput.readInt();
        CONSTANTPoolElement tempName = pool.get(attr_name_index);
        if (!(tempName instanceof CONSTANT_Utf8))
        {
            throw new IllegalStateException("Некорректный тип константы:" + tempName.toString());
        }
        String name = ((CONSTANT_Utf8)tempName).getString();
        
        if (System.getProperty("debug") != null && System.getProperty("debug").equalsIgnoreCase("true"))
            System.out.println("Loading attribute   " + name); 
        
        AbstractAttribute result = getElementByType(name); // создаётся элемент
        
        result.setAttribute_name_index(attr_name_index);
        result.setAttribute_lenght(attr_len);

        result.selfLoad(mainInput, pool); // самозагрузка
        
        return result;   
    }