📄 attribute.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sat Dec 15 07:40:13 EST 2001 --><TITLE>bcel API: Class Attribute</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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="class-use/Attribute.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../org/apache/bcel/classfile/AccessFlags.html"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/bcel/classfile/ClassParser.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Attribute.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.bcel.classfile</FONT><BR>Class Attribute</H2><PRE>java.lang.Object | +--<B>org.apache.bcel.classfile.Attribute</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, <A HREF="../../../../org/apache/bcel/classfile/Node.html">Node</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/bcel/classfile/Code.html">Code</A>, <A HREF="../../../../org/apache/bcel/classfile/ConstantValue.html">ConstantValue</A>, <A HREF="../../../../org/apache/bcel/classfile/Deprecated.html">Deprecated</A>, <A HREF="../../../../org/apache/bcel/classfile/ExceptionTable.html">ExceptionTable</A>, <A HREF="../../../../org/apache/bcel/classfile/InnerClasses.html">InnerClasses</A>, <A HREF="../../../../org/apache/bcel/classfile/LineNumberTable.html">LineNumberTable</A>, <A HREF="../../../../org/apache/bcel/classfile/LocalVariableTable.html">LocalVariableTable</A>, <A HREF="../../../../org/apache/bcel/classfile/PMGClass.html">PMGClass</A>, <A HREF="../../../../org/apache/bcel/classfile/Signature.html">Signature</A>, <A HREF="../../../../org/apache/bcel/classfile/SourceFile.html">SourceFile</A>, <A HREF="../../../../org/apache/bcel/classfile/StackMap.html">StackMap</A>, <A HREF="../../../../org/apache/bcel/classfile/Synthetic.html">Synthetic</A>, <A HREF="../../../../org/apache/bcel/classfile/Unknown.html">Unknown</A></DD></DL><HR><DL><DT>public abstract class <B>Attribute</B><DT>extends java.lang.Object<DT>implements java.lang.Cloneable, <A HREF="../../../../org/apache/bcel/classfile/Node.html">Node</A></DL><P>Abstract super class for <em>Attribute</em> objects. Currently the <em>ConstantValue</em>, <em>SourceFile</em>, <em>Code</em>, <em>Exceptiontable</em>, <em>LineNumberTable</em>, <em>LocalVariableTable</em>, <em>InnerClasses</em> and <em>Synthetic</em> attributes are supported. The <em>Unknown</em> attribute stands for non-standard-attributes.<P><DL><DT><B>Version: </B><DD>$Id: Attribute.java,v 1.2 2001/11/20 11:41:05 mdahm Exp $</DD><DT><B>Author: </B><DD><A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A></DD><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/bcel/classfile/ConstantValue.html"><CODE>ConstantValue</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/SourceFile.html"><CODE>SourceFile</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/Code.html"><CODE>Code</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/Unknown.html"><CODE>Unknown</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/ExceptionTable.html"><CODE>ExceptionTable</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/LineNumberTable.html"><CODE>LineNumberTable</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/LocalVariableTable.html"><CODE>LocalVariableTable</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/InnerClasses.html"><CODE>InnerClasses</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/Synthetic.html"><CODE>Synthetic</CODE></A>, <A HREF="../../../../org/apache/bcel/classfile/Deprecated.html"><CODE>Deprecated</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../../org/apache/bcel/classfile/ConstantPool.html">ConstantPool</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#constant_pool">constant_pool</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#length">length</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#name_index">name_index</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#tag">tag</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#accept(org.apache.bcel.classfile.Visitor)">accept</A></B>(<A HREF="../../../../org/apache/bcel/classfile/Visitor.html">Visitor</A> v)</CODE><BR> Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#addAttributeReader(java.lang.String, org.apache.bcel.classfile.AttributeReader)">addAttributeReader</A></B>(java.lang.String name, <A HREF="../../../../org/apache/bcel/classfile/AttributeReader.html">AttributeReader</A> r)</CODE><BR> Add an Attribute reader capable of parsing (user-defined) attributes named "name".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#clone()">clone</A></B>()</CODE><BR> Use copy() if you want to have a deep copy(), i.e., with all references copied correctly.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../../org/apache/bcel/classfile/Attribute.html">Attribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#copy(org.apache.bcel.classfile.ConstantPool)">copy</A></B>(<A HREF="../../../../org/apache/bcel/classfile/ConstantPool.html">ConstantPool</A> constant_pool)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#dump(java.io.DataOutputStream)">dump</A></B>(java.io.DataOutputStream file)</CODE><BR> Dump attribute to file stream in binary format.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/classfile/ConstantPool.html">ConstantPool</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#getConstantPool()">getConstantPool</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#getLength()">getLength</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#getNameIndex()">getNameIndex</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#getTag()">getTag</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#removeAttributeReader(java.lang.String)">removeAttributeReader</A></B>(java.lang.String name)</CODE><BR> Remove attribute reader</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#setConstantPool(org.apache.bcel.classfile.ConstantPool)">setConstantPool</A></B>(<A HREF="../../../../org/apache/bcel/classfile/ConstantPool.html">ConstantPool</A> constant_pool)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#setLength(int)">setLength</A></B>(int length)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/classfile/Attribute.html#setNameIndex(int)">setNameIndex</A></B>(int name_index)</CODE><BR> </TD></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="../../../../org/apache/bcel/classfile/Attribute.html#toString()">toString</A></B>()</CODE><BR> </TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="name_index"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -