author | joehw |
Wed, 26 Jun 2019 05:49:59 +0000 | |
changeset 55496 | 8e0ae3830fca |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
6 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
44797
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
5 |
/* |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
6 |
* Licensed to the Apache Software Foundation (ASF) under one or more |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
7 |
* contributor license agreements. See the NOTICE file distributed with |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
8 |
* this work for additional information regarding copyright ownership. |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
9 |
* The ASF licenses this file to You under the Apache License, Version 2.0 |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
10 |
* (the "License"); you may not use this file except in compliance with |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
11 |
* the License. You may obtain a copy of the License at |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
12 |
* |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
13 |
* http://www.apache.org/licenses/LICENSE-2.0 |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
14 |
* |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
15 |
* Unless required by applicable law or agreed to in writing, software |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
16 |
* distributed under the License is distributed on an "AS IS" BASIS, |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
17 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
18 |
* See the License for the specific language governing permissions and |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
19 |
* limitations under the License. |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
20 |
*/ |
8b3b3b911b8a
8162572: Update License Header for all JAXP sources
joehw
parents:
25868
diff
changeset
|
21 |
|
6 | 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 |
|
55496 | 30 |
* @version $Id$ |
46174 | 31 |
* |
32 |
* @deprecated Use UnknownAttributeReader instead |
|
6 | 33 |
*/ |
46174 | 34 |
@java.lang.Deprecated |
6 | 35 |
public interface AttributeReader { |
46174 | 36 |
|
37 |
/** |
|
6 | 38 |
When this attribute reader is added via the static method |
39 |
Attribute.addAttributeReader, an attribute name is associated with it. |
|
40 |
As the class file parser parses attributes, it will call various |
|
41 |
AttributeReaders based on the name of the attributes it is |
|
42 |
constructing. |
|
43 |
||
44 |
@param name_index An index into the constant pool, indexing a |
|
45 |
ConstantUtf8 that represents the name of the attribute. |
|
46 |
||
47 |
@param length The length of the data contained in the attribute. This |
|
48 |
is written into the constant pool and should agree with what the |
|
49 |
factory expects the length to be. |
|
50 |
||
51 |
@param file This is the data input stream that the factory needs to read |
|
52 |
its data from. |
|
53 |
||
54 |
@param constant_pool This is the constant pool associated with the |
|
55 |
Attribute that we are constructing. |
|
56 |
||
57 |
@return The user-defined AttributeReader should take this data and use |
|
58 |
it to construct an attribute. In the case of errors, a null can be |
|
59 |
returned which will cause the parsing of the class file to fail. |
|
60 |
||
61 |
@see Attribute#addAttributeReader( String, AttributeReader ) |
|
46174 | 62 |
*/ |
63 |
Attribute createAttribute( int name_index, int length, java.io.DataInputStream file, ConstantPool constant_pool ); |
|
6 | 64 |
} |