1 package attrib4j.bcel;
2
3 import java.io.InputStream;
4
5 import attrib4j.AttributeException;
6 import attrib4j.AttributeExtractor;
7 import attrib4j.AttributeFactory;
8 import attrib4j.ClassAnnotator;
9
10 /***
11 * The BCEL implementation of the AttributeFactory.
12 *
13 * @author <a href="mailto:mpollack@speakeasy.net">Mark Pollack</a>
14 * @version $Id: BCELFactory.java,v 1.4 2003/04/24 05:41:54 markpollack Exp $
15 */
16
17 public class BCELFactory extends AttributeFactory {
18
19 /***
20 * A do nothing constructor.
21 *
22 */
23 public BCELFactory() {
24 }
25
26 /***
27 * Method to return a BCEL implementation of a {@link ClassAnnotator}.
28 *
29 * @param InputStream initialized with .class file.
30 * @param classfileName the name of the .class file.
31 * @return a value of type 'ClassAnnotator'
32 * @exception AttributeException if could not load the classfile from
33 * the input stream when creating a ClassAnnotator.
34 */
35 public ClassAnnotator getClassAnnotator(
36 InputStream is,
37 String classfileName)
38 throws AttributeException {
39
40 return new BCELClassAnnotator(is, classfileName);
41 }
42
43 /***
44 * Method to return a BCEL implementation of {@link AttributeExtractor}.
45 *
46 * @exception AttributeException will not be thrown in this impl.
47 */
48 public AttributeExtractor getAttributeExtractor()
49 throws AttributeException {
50
51 return new BCELAttributeExtractor();
52 }
53
54 } // BCELFactory
This page was automatically generated by Maven