FileDocCategorySizeDatePackage
GenericAttribute.javaAPI DocGlassfish v2 API3255Fri May 04 22:34:28 BST 2007com.sun.jdo.api.persistence.enhancer.classfile

GenericAttribute

public class GenericAttribute extends ClassAttribute
GenericAttribute represents a class attribute in a class file which is not recognized as any supported attribute type. These attributes are maintained, and are not modified in any way.

Fields Summary
byte[]
attributeBytes
Constructors Summary
public GenericAttribute(ConstUtf8 attrName, byte[] attrBytes)
constructor

    super(attrName);
    attributeBytes = attrBytes;
  
Methods Summary
voidprint(java.io.PrintStream out, int indent)

    ClassPrint.spaces(out, indent);
    out.println("Generic Attribute(" + attrName().asString() + "): " +//NOI18N
               Integer.toString(attributeBytes.length) +
                " in length");//NOI18N
    for (int i=0; i<attributeBytes.length; i++) {
      if ((i % 16) == 0) {
	if (i != 0) 
	  out.println();
	out.print(i + " :");//NOI18N
      }
      out.print(" " + Integer.toString((attributeBytes[i] & 0xff), 16));//NOI18N
    }
    out.println();
  
voidwrite(java.io.DataOutputStream out)

    out.writeShort(attrName().getIndex());
    out.writeInt(attributeBytes.length);
    out.write(attributeBytes, 0, attributeBytes.length);