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) |
protected |
ClassEntry(String classname,
ClassPackage pckg,
Integer version) |
Modifier and Type | Method and Description |
---|---|
List<ClassEntry> |
getAlternatives()
Returns a list of all other .class files with the same fully qualified name.
|
ClassFile |
getClassfile()
Resolves the
ClassFile by analyzing the byte code. |
String |
getClassname() |
ClassPackage |
getPackage() |
String |
getShortName() |
abstract URI |
getURI() |
Integer |
getVersion()
Returns the major version number N, if the .class file is located
in the META-INF/versions/N directory of a Multi-release JAR file, null otherwise.
|
protected abstract ClassFile |
resolveClassFile() |
protected ClassEntry(String classname, ClassPackage pckg)
protected ClassEntry(String classname, ClassPackage pckg, Integer version)
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.ClassFile
protected abstract ClassFile resolveClassFile()
public ClassPackage getPackage()
ClassPackage
this ClassEntry belongs to.public List<ClassEntry> getAlternatives()
public Integer getVersion()
Copyright © 2017–2023 Hans Jörg Heßmann. All rights reserved.