<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Thu May 12 21:54:56 GMT 2011 --> <TITLE> Attribute </TITLE> <META NAME="date" CONTENT="2011-05-12"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Attribute"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/asm/AnnotationVisitor.html" title="interface in com.sleepycat.asm"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/asm/ByteVector.html" title="class in com.sleepycat.asm"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/sleepycat/asm/Attribute.html" target="_top"><B>FRAMES</B></A> <A HREF="Attribute.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.sleepycat.asm</FONT> <BR> Class Attribute</H2> <PRE> java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.asm.Attribute</B> </PRE> <HR> <DL> <DT><PRE>public class <B>Attribute</B><DT>extends java.lang.Object</DL> </PRE> <P> A non standard class, field, method or code attribute. <P> <P> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/asm/Attribute.html#type">type</A></B></CODE> <BR> The type of this attribute.</TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected </CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/asm/Attribute.html#Attribute(java.lang.String)">Attribute</A></B>(java.lang.String type)</CODE> <BR> Constructs a new empty attribute.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../../../com/sleepycat/asm/Label.html" title="class in com.sleepycat.asm">Label</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/asm/Attribute.html#getLabels()">getLabels</A></B>()</CODE> <BR> Returns the labels corresponding to this attribute.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/asm/Attribute.html#isCodeAttribute()">isCodeAttribute</A></B>()</CODE> <BR> Returns <tt>true</tt> if this type of attribute is a code attribute.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/asm/Attribute.html#isUnknown()">isUnknown</A></B>()</CODE> <BR> Returns <tt>true</tt> if this type of attribute is unknown.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../../../com/sleepycat/asm/Attribute.html" title="class in com.sleepycat.asm">Attribute</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/asm/Attribute.html#read(com.sleepycat.asm.ClassReader, int, int, char[], int, com.sleepycat.asm.Label[])">read</A></B>(<A HREF="../../../com/sleepycat/asm/ClassReader.html" title="class in com.sleepycat.asm">ClassReader</A> cr, int off, int len, char[] buf, int codeOff, <A HREF="../../../com/sleepycat/asm/Label.html" title="class in com.sleepycat.asm">Label</A>[] labels)</CODE> <BR> Reads a <A HREF="../../../com/sleepycat/asm/Attribute.html#type"><CODE>type</CODE></A> attribute.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../../../com/sleepycat/asm/ByteVector.html" title="class in com.sleepycat.asm">ByteVector</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/asm/Attribute.html#write(com.sleepycat.asm.ClassWriter, byte[], int, int, int)">write</A></B>(<A HREF="../../../com/sleepycat/asm/ClassWriter.html" title="class in com.sleepycat.asm">ClassWriter</A> cw, byte[] code, int len, int maxStack, int maxLocals)</CODE> <BR> Returns the byte array form of this attribute.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="type"><!-- --></A><H3> type</H3> <PRE> public final java.lang.String <B>type</B></PRE> <DL> <DD>The type of this attribute. <P> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="Attribute(java.lang.String)"><!-- --></A><H3> Attribute</H3> <PRE> protected <B>Attribute</B>(java.lang.String type)</PRE> <DL> <DD>Constructs a new empty attribute. <P> <DL> <DT><B>Parameters:</B><DD><CODE>type</CODE> - the type of the attribute.</DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="isUnknown()"><!-- --></A><H3> isUnknown</H3> <PRE> public boolean <B>isUnknown</B>()</PRE> <DL> <DD>Returns <tt>true</tt> if this type of attribute is unknown. The default implementation of this method always returns <tt>true</tt>. <P> <DD><DL> <DT><B>Returns:</B><DD><tt>true</tt> if this type of attribute is unknown.</DL> </DD> </DL> <HR> <A NAME="isCodeAttribute()"><!-- --></A><H3> isCodeAttribute</H3> <PRE> public boolean <B>isCodeAttribute</B>()</PRE> <DL> <DD>Returns <tt>true</tt> if this type of attribute is a code attribute. <P> <DD><DL> <DT><B>Returns:</B><DD><tt>true</tt> if this type of attribute is a code attribute.</DL> </DD> </DL> <HR> <A NAME="getLabels()"><!-- --></A><H3> getLabels</H3> <PRE> protected <A HREF="../../../com/sleepycat/asm/Label.html" title="class in com.sleepycat.asm">Label</A>[] <B>getLabels</B>()</PRE> <DL> <DD>Returns the labels corresponding to this attribute. <P> <DD><DL> <DT><B>Returns:</B><DD>the labels corresponding to this attribute, or <tt>null</tt> if this attribute is not a code attribute that contains labels.</DL> </DD> </DL> <HR> <A NAME="read(com.sleepycat.asm.ClassReader, int, int, char[], int, com.sleepycat.asm.Label[])"><!-- --></A><H3> read</H3> <PRE> protected <A HREF="../../../com/sleepycat/asm/Attribute.html" title="class in com.sleepycat.asm">Attribute</A> <B>read</B>(<A HREF="../../../com/sleepycat/asm/ClassReader.html" title="class in com.sleepycat.asm">ClassReader</A> cr, int off, int len, char[] buf, int codeOff, <A HREF="../../../com/sleepycat/asm/Label.html" title="class in com.sleepycat.asm">Label</A>[] labels)</PRE> <DL> <DD>Reads a <A HREF="../../../com/sleepycat/asm/Attribute.html#type"><CODE>type</CODE></A> attribute. This method must return a <i>new</i> <A HREF="../../../com/sleepycat/asm/Attribute.html" title="class in com.sleepycat.asm"><CODE>Attribute</CODE></A> object, of type <A HREF="../../../com/sleepycat/asm/Attribute.html#type"><CODE>type</CODE></A>, corresponding to the <tt>len</tt> bytes starting at the given offset, in the given class reader. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cr</CODE> - the class that contains the attribute to be read.<DD><CODE>off</CODE> - index of the first byte of the attribute's content in <A HREF="../../../com/sleepycat/asm/ClassReader.html#b"><CODE>cr.b</CODE></A>. The 6 attribute header bytes, containing the type and the length of the attribute, are not taken into account here.<DD><CODE>len</CODE> - the length of the attribute's content.<DD><CODE>buf</CODE> - buffer to be used to call <A HREF="../../../com/sleepycat/asm/ClassReader.html#readUTF8(int, char[])"><CODE>readUTF8</CODE></A>, <A HREF="../../../com/sleepycat/asm/ClassReader.html#readClass(int, char[])"><CODE>readClass</CODE></A> or <A HREF="../../../com/sleepycat/asm/ClassReader.html#readConst(int, char[])"><CODE>readConst</CODE></A>.<DD><CODE>codeOff</CODE> - index of the first byte of code's attribute content in <A HREF="../../../com/sleepycat/asm/ClassReader.html#b"><CODE>cr.b</CODE></A>, or -1 if the attribute to be read is not a code attribute. The 6 attribute header bytes, containing the type and the length of the attribute, are not taken into account here.<DD><CODE>labels</CODE> - the labels of the method's code, or <tt>null</tt> if the attribute to be read is not a code attribute. <DT><B>Returns:</B><DD>a <i>new</i> <A HREF="../../../com/sleepycat/asm/Attribute.html" title="class in com.sleepycat.asm"><CODE>Attribute</CODE></A> object corresponding to the given bytes.</DL> </DD> </DL> <HR> <A NAME="write(com.sleepycat.asm.ClassWriter, byte[], int, int, int)"><!-- --></A><H3> write</H3> <PRE> protected <A HREF="../../../com/sleepycat/asm/ByteVector.html" title="class in com.sleepycat.asm">ByteVector</A> <B>write</B>(<A HREF="../../../com/sleepycat/asm/ClassWriter.html" title="class in com.sleepycat.asm">ClassWriter</A> cw, byte[] code, int len, int maxStack, int maxLocals)</PRE> <DL> <DD>Returns the byte array form of this attribute. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cw</CODE> - the class to which this attribute must be added. This parameter can be used to add to the constant pool of this class the items that corresponds to this attribute.<DD><CODE>code</CODE> - the bytecode of the method corresponding to this code attribute, or <tt>null</tt> if this attribute is not a code attributes.<DD><CODE>len</CODE> - the length of the bytecode of the method corresponding to this code attribute, or <tt>null</tt> if this attribute is not a code attribute.<DD><CODE>maxStack</CODE> - the maximum stack size of the method corresponding to this code attribute, or -1 if this attribute is not a code attribute.<DD><CODE>maxLocals</CODE> - the maximum number of local variables of the method corresponding to this code attribute, or -1 if this attribute is not a code attribute. <DT><B>Returns:</B><DD>the byte array form of this attribute.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/asm/AnnotationVisitor.html" title="interface in com.sleepycat.asm"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/asm/ByteVector.html" title="class in com.sleepycat.asm"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/sleepycat/asm/Attribute.html" target="_top"><B>FRAMES</B></A> <A HREF="Attribute.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>