< prev index next >

src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/UnknownAttributeReader.java

Print this page




  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.bcel.internal.classfile;
  23 
  24 /**
  25  * Unknown (non-standard) attributes may be read via user-defined factory
  26  * objects that can be registered with the Attribute.addAttributeReader
  27  * method. These factory objects should implement this interface.
  28  *
  29  * @see Attribute
  30  * @version $Id$
  31  * @since 6.0
  32  */
  33 public interface UnknownAttributeReader {
  34 
  35     /**
  36      * When this attribute reader is added via the static method Attribute.addAttributeReader,
  37      * an attribute name is associated with it. As the class file parser parses attributes,
  38      * it will call various AttributeReaders based on the name of the attributes it is constructing.
  39      *
  40      * @param name_index    An index into the constant pool, indexing a ConstantUtf8
  41      *                      that represents the name of the attribute.
  42      * @param length        The length of the data contained in the attribute. This is written
  43      *                      into the constant pool and should agree with what the factory expects the length to be.
  44      * @param file          This is the data input that the factory needs to read its data from.
  45      * @param constant_pool This is the constant pool associated with the Attribute that we are constructing.
  46      *
  47      * @return The user-defined AttributeReader should take this data and use
  48      * it to construct an attribute.  In the case of errors, a null can be
  49      * returned which will cause the parsing of the class file to fail.
  50      *


  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.bcel.internal.classfile;
  23 
  24 /**
  25  * Unknown (non-standard) attributes may be read via user-defined factory
  26  * objects that can be registered with the Attribute.addAttributeReader
  27  * method. These factory objects should implement this interface.
  28  *
  29  * @see Attribute

  30  * @since 6.0
  31  */
  32 public interface UnknownAttributeReader {
  33 
  34     /**
  35      * When this attribute reader is added via the static method Attribute.addAttributeReader,
  36      * an attribute name is associated with it. As the class file parser parses attributes,
  37      * it will call various AttributeReaders based on the name of the attributes it is constructing.
  38      *
  39      * @param name_index    An index into the constant pool, indexing a ConstantUtf8
  40      *                      that represents the name of the attribute.
  41      * @param length        The length of the data contained in the attribute. This is written
  42      *                      into the constant pool and should agree with what the factory expects the length to be.
  43      * @param file          This is the data input that the factory needs to read its data from.
  44      * @param constant_pool This is the constant pool associated with the Attribute that we are constructing.
  45      *
  46      * @return The user-defined AttributeReader should take this data and use
  47      * it to construct an attribute.  In the case of errors, a null can be
  48      * returned which will cause the parsing of the class file to fail.
  49      *
< prev index next >