jvanzyl 02/04/11 07:09:04
Modified: src/java/org/apache/bcel/classfile AttributeReader.java
xdocs index.xml
Log:
Applying doco patch supplied by Dale Martin.
Revision Changes Path
1.2 +36 -8 jakarta-bcel/src/java/org/apache/bcel/classfile/AttributeReader.java
Index: AttributeReader.java
===================================================================
RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/classfile/AttributeReader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AttributeReader.java 20 Nov 2001 11:40:46 -0000 1.1
+++ AttributeReader.java 11 Apr 2002 14:09:04 -0000 1.2
@@ -55,16 +55,44 @@
*/
/**
- * Unknown (non-standard) attributes may be read via user-defined
- * factory objects that can be registered with the Attribute.addAttributeReader
- * method.
- *
+
+ * Unknown (non-standard) attributes may be read via user-defined factory
+ * objects that can be registered with the Attribute.addAttributeReader
+ * method. These factory objects should implement this interface.
+
* @see Attribute
- * @version $Id: AttributeReader.java,v 1.1 2001/11/20 11:40:46 mdahm Exp $
+ * @version $Id: AttributeReader.java,v 1.2 2002/04/11 14:09:04 jvanzyl Exp $
* @author <A HREF="mailto:[email protected]">M. Dahm</A>
*/
public interface AttributeReader {
- public Attribute createAttribute(int name_index, int length,
- java.io.DataInputStream file,
- ConstantPool constant_pool);
+ /**
+ When this attribute reader is added via the static method
+ Attribute.addAttributeReader, an attribute name is associated with it.
+ As the class file parser parses attributes, it will call various
+ AttributeReaders based on the name of the attributes it is
+ constructing.
+
+ @param name_index An index into the constant pool, indexing a
+ ConstantUtf8 that represents the name of the attribute.
+
+ @param length The length of the data contained in the attribute. This
+ is written into the constant pool and should agree with what the
+ factory expects the length to be.
+
+ @param file This is the data input stream that the factory needs to read
+ its data from.
+
+ @param constant_pool This is the constant pool associated with the
+ Attribute that we are constructing.
+
+ @return The user-defined AttributeReader should take this data and use
+ it to construct an attribute. In the case of errors, a null can be
+ returned which will cause the parsing of the class file to fail.
+
+ @see Attribute#addAttributeReader( String, AttributeReader )
+ */
+ public Attribute createAttribute( int name_index,
+ int length,
+ java.io.DataInputStream file,
+ ConstantPool constant_pool );
}
1.4 +1 -1 jakarta-bcel/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-bcel/xdocs/index.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- index.xml 13 Mar 2002 08:37:00 -0000 1.3
+++ index.xml 11 Apr 2002 14:09:04 -0000 1.4
@@ -31,7 +31,7 @@
BCEL is already being used successfully in several projects such
as compilers, optimizers, obsfuscators and analysis tools, the
most popular probably being the <a
- href="http://xml.apache.org/xalan-j/>Xalan XSLT processor</a> at
+ href="http://xml.apache.org/xalan-j/">Xalan XSLT processor</a> at
Apache.
</p>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.