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
ConstructorDescriptionImportVisitor
(org.apache.bcel.classfile.JavaClass javaClass) Create an Import visitor. -
Method Summary
Modifier and TypeMethodDescriptionGet 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
visitAnnotation, visitAnnotationDefault, visitAnnotationEntry, visitBootstrapMethods, visitCode, visitCodeException, visitConstantDouble, visitConstantDynamic, visitConstantFieldref, visitConstantFloat, visitConstantInteger, visitConstantInterfaceMethodref, visitConstantInvokeDynamic, visitConstantLong, visitConstantMethodHandle, visitConstantMethodref, visitConstantMethodType, visitConstantModule, visitConstantNameAndType, visitConstantPackage, visitConstantPool, visitConstantString, visitConstantValue, visitDeprecated, visitEnclosingMethod, visitExceptionTable, visitField, visitInnerClass, visitInnerClasses, visitJavaClass, visitLineNumber, visitLineNumberTable, visitLocalVariable, visitLocalVariableTable, visitLocalVariableTypeTable, visitMethod, visitMethodParameter, visitMethodParameters, visitModule, visitModuleExports, visitModuleMainClass, visitModuleOpens, visitModulePackages, visitModuleProvides, visitModuleRequires, visitNestHost, visitNestMembers, visitParameterAnnotation, visitParameterAnnotationEntry, visitSignature, visitSourceFile, visitStackMap, visitStackMapEntry, visitStackMapType, visitSynthetic, visitUnknown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.bcel.classfile.Visitor
visitRecord, visitRecordComponent
-
Constructor Details
-
ImportVisitor
public ImportVisitor(org.apache.bcel.classfile.JavaClass javaClass) Create an Import visitor.- Parameters:
javaClass
- the javaclass to work from
-
-
Method Details
-
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 interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitConstantClass
in classorg.apache.bcel.classfile.EmptyVisitor
- See Also:
-
visitConstantUtf8
public void visitConstantUtf8(org.apache.bcel.classfile.ConstantUtf8 constantUtf8) Find any package class Strings in the UTF8 String Pool.- Specified by:
visitConstantUtf8
in interfaceorg.apache.bcel.classfile.Visitor
- Overrides:
visitConstantUtf8
in classorg.apache.bcel.classfile.EmptyVisitor
- See Also:
-