Package org.vafer.jdependency
Class Clazz
java.lang.Object
org.vafer.jdependency.Clazz
- All Implemented Interfaces:
Comparable<Clazz>
A `Clazz` represents the single class identifier inside a classpath.
There is only one `Clazz` per classname. It has incoming and outgoing
edges defining references and dependencies. If there are different
versions found, it collects their sources as ClazzpathUnits.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<String, Clazz.ClazzFile> private static final Pattern
private final String
private final Map
<ClazzpathUnit, String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClazzpathUnit
(ClazzpathUnit pUnit, String pDigest) void
addDependency
(Clazz pClazz) void
addMultiReleaseFile
(ClazzpathUnit pUnit, String pForJava, String pFileName) Record that this class name can be found at:int
boolean
(package private) void
findTransitiveDependencies
(Set<? super Clazz> pAll) getName()
int
hashCode()
static boolean
isMultiReleaseClassFile
(String pFileName) Determine if the provided filename is the name of a class that is specific for a java version.static Clazz.ParsedFileName
parseClassFileName
(String pFileName) Determine the class name for the provided filename.void
removeClazzpathUnit
(ClazzpathUnit pUnit) void
removeDependency
(Clazz pClazz) toString()
-
Field Details
-
dependencies
-
references
-
units
-
classFilenames
-
name
-
EXTRACT_MULTI_RELEASE_JAVA_VERSION
-
-
Constructor Details
-
Clazz
-
-
Method Details
-
parseClassFileName
Determine the class name for the provided filename.- Parameters:
pFileName
- The filename- Returns:
- the class name for the provided filename OR null if it is not a .class file.
-
isMultiReleaseClassFile
Determine if the provided filename is the name of a class that is specific for a java version.- Parameters:
pFileName
- The filename to be evaluated- Returns:
- true if this is a filename for a specific java version, false if it is not
-
addMultiReleaseFile
Record that this class name can be found at:- Parameters:
pUnit
- The unit in which the class can be foundpForJava
- For which Java versionpFileName
- Under which filename in the jar.
-
getName
-
getFileNames
-
addClazzpathUnit
-
removeClazzpathUnit
-
getClazzpathUnits
-
getVersions
-
addDependency
-
removeDependency
-
getDependencies
-
getReferences
-
getTransitiveDependencies
-
findTransitiveDependencies
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Clazz>
-
toString
-