FileDocCategorySizeDatePackage
GenericAttribute_info.javaAPI DocAndroid 1.5 API2992Wed May 06 22:41:16 BST 2009com.vladium.jcd.cls.attribute

GenericAttribute_info

public final class GenericAttribute_info extends Attribute_info
This attribute structure is used during parsing to absorb all attribute types that are not currently recognized.
see
Attribute_info
author
(C) 2001, Vlad Roubtsov

Fields Summary
public byte[]
m_info
private static final byte[]
EMPTY_BYTE_ARRAY
Constructors Summary
public GenericAttribute_info(int attribute_name_index, byte[] info)

        super (attribute_name_index, (info != null ? info.length : 0));
        
        m_info = (info != null ? info : EMPTY_BYTE_ARRAY);
    
GenericAttribute_info(int attribute_name_index, long attribute_length, com.vladium.jcd.lib.UDataInputStream bytes)

        super (attribute_name_index, attribute_length);
        
        m_info = new byte [(int) m_attribute_length];
        bytes.readFully (m_info);
    
Methods Summary
public voidaccept(IAttributeVisitor visitor, java.lang.Object ctx)

        visitor.visit (this, ctx);
    
public java.lang.Objectclone()
Performs a deep copy.

        final GenericAttribute_info _clone = (GenericAttribute_info) super.clone ();
        
        // do deep copy:
        _clone.m_info = (m_info.length == 0 ? EMPTY_BYTE_ARRAY : (byte []) m_info.clone ());
        
        return _clone;
    
public longlength()

        return 6 + m_info.length; 
    
public java.lang.StringtoString()

        return "generic attribute_info: [attribute_name_index = " + m_name_index + ", attribute_length = " + m_attribute_length + ']";
    
public voidwriteInClassFormat(com.vladium.jcd.lib.UDataOutputStream out)

        super.writeInClassFormat (out);
        
        out.write (m_info, 0, m_info.length);