public abstract class ClassEntry extends Object
ClassPackage it belongs to.
If there is another .class file with the same name in some other classes directory or
.jar file within the ClassResolver scope it has a reference to a list of all
such .class files.| Modifier | Constructor and Description |
|---|---|
protected |
ClassEntry(String classname,
ClassPackage pckg) |
| Modifier and Type | Method and Description |
|---|---|
List<ClassEntry> |
getAlternatives()
Returns a list of all other .class files with the same fully qualified name.
|
List<ClassEntry> |
getAlternativesWithinSamePackage()
Returns a list of all other .class files with the same fully qualified name with the same
ClassRoot. |
ClassFile |
getClassfile()
Resolves the
ClassFile by analyzing the byte code. |
String |
getClassname() |
ClassPackage |
getPackage() |
String |
getShortName() |
abstract URI |
getURI() |
protected abstract ClassFile |
resolveClassFile() |
protected ClassEntry(String classname, ClassPackage pckg)
public String getClassname()
public String getShortName()
public ClassFile getClassfile()
ClassFile by analyzing the byte code. This is a time-consuming operation and
should be called as late as possible. For .jar files the most time is spent by decompressing the
.class file. The result will be cached for further calls.ClassFileprotected abstract ClassFile resolveClassFile()
public ClassPackage getPackage()
ClassPackage this ClassEntry belongs to.public List<ClassEntry> getAlternatives()
public List<ClassEntry> getAlternativesWithinSamePackage()
ClassRoot.
Such .class files exist within multi-release JAR files within the META-INF/versions directory.Copyright © 2017–2022 Hans Jörg Heßmann. All rights reserved.