Class DependencyClassFileVisitor
java.lang.Object
org.apache.maven.shared.dependency.analyzer.asm.DependencyClassFileVisitor
- All Implemented Interfaces:
ClassFileVisitor
Computes the set of classes referenced by visited class files, using
DependencyVisitor.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final ClassesPatternsprivate final ResultCollector -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for DependencyClassFileVisitor.DependencyClassFileVisitor(ClassesPatterns excludedClasses) Constructor for DependencyClassFileVisitor. -
Method Summary
Modifier and TypeMethodDescriptiongetDependencies.getDependencyUsages.private byte[]voidvisitClass(String className, InputStream in) Visits a class.
-
Field Details
-
BUF_SIZE
private static final int BUF_SIZE- See Also:
-
resultCollector
-
excludedClasses
-
-
Constructor Details
-
DependencyClassFileVisitor
public DependencyClassFileVisitor()Constructor for DependencyClassFileVisitor.
-
Method Details
-
visitClass
Visits a class.- Specified by:
visitClassin interfaceClassFileVisitor- Parameters:
className- the name of the class being visitedin- theInputStreamto read the byte code from- Throws:
VisitClassException- if the .class file is corruptUncheckedIOException- if an I/O error occurs while reading the class file
-
toByteArray
- Throws:
IOException
-
getDependencies
getDependencies.
- Returns:
- the set of classes referenced by visited class files
-
getDependencyUsages
getDependencyUsages.
- Returns:
- the set of classes referenced by visited class files, paired with classes declaring the references
-