## org.apache.maven.shared.jar.classes
Class ImportVisitor

    java.lang.Object
      org.apache.bcel.classfile.EmptyVisitor
          org.apache.maven.shared.jar.classes.ImportVisitor

All Implemented Interfaces:
  org.apache.bcel.classfile.Visitor

    public class ImportVisitor

extends org.apache.bcel.classfile.EmptyVisitor

Implementation of a BCEL class visitor that analyzes a class and collects imports.

Constructor Summary
`ImportVisitor(org.apache.bcel.classfile.JavaClass javaClass)` Create an Import visitor.

Method Summary
`java.util.List` `getImports()` Get the list of discovered imports.
`void` `visitConstantClass(org.apache.bcel.classfile.ConstantClass constantClass)` Find any formally declared import in the Constant Pool.
`void` `visitConstantUtf8(org.apache.bcel.classfile.ConstantUtf8 constantUtf8)` Find any package class Strings in the UTF8 String Pool.

Methods inherited from class org.apache.bcel.classfile.EmptyVisitor

`visitCode, visitCodeException, visitConstantDouble, visitConstantFieldref, visitConstantFloat, visitConstantInteger, visitConstantInterfaceMethodref, visitConstantLong, visitConstantMethodref, visitConstantNameAndType, visitConstantPool, visitConstantString, visitConstantValue, visitDeprecated, visitExceptionTable, visitField, visitInnerClass, visitInnerClasses, visitJavaClass, visitLineNumber, visitLineNumberTable, visitLocalVariable, visitLocalVariableTable, visitMethod, visitSignature, visitSourceFile, visitStackMap, visitStackMapEntry, visitSynthetic, visitUnknown`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ImportVisitor

    public ImportVisitor(org.apache.bcel.classfile.JavaClass javaClass)

  Create an Import visitor.

  Parameters:
    `javaClass` - the javaclass to work from

Method Detail

### getImports

    public java.util.List getImports()

  Get the list of discovered imports.

  Returns:
    Returns the imports.

### visitConstantClass

    public void visitConstantClass(org.apache.bcel.classfile.ConstantClass constantClass)

  Find any formally declared import in the Constant Pool.

  Specified by:
    `visitConstantClass` in interface `org.apache.bcel.classfile.Visitor`
  Overrides:
    `visitConstantClass` in class `org.apache.bcel.classfile.EmptyVisitor`
  See Also:
    `EmptyVisitor.visitConstantClass(org.apache.bcel.classfile.ConstantClass)`

### visitConstantUtf8

    public void visitConstantUtf8(org.apache.bcel.classfile.ConstantUtf8 constantUtf8)

  Find any package class Strings in the UTF8 String Pool.

  Specified by:
    `visitConstantUtf8` in interface `org.apache.bcel.classfile.Visitor`
  Overrides:
    `visitConstantUtf8` in class `org.apache.bcel.classfile.EmptyVisitor`
  See Also:
    `EmptyVisitor.visitConstantUtf8(org.apache.bcel.classfile.ConstantUtf8)`

Copyright © 2011. All Rights Reserved.