public class ClassScanner.ClassPathEntry
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
archiveName()
Returns archive name or
null if entry is not inside archived file. |
void |
closeInputStream()
Closes input stream if opened.
|
boolean |
isArchive()
Returns
true if archive. |
boolean |
isTypeSignatureInUse(byte[] bytes)
Returns
true if class contains type signature . |
java.lang.Class |
loadClass()
Loads class by its name.
|
java.lang.String |
name()
Returns entry name.
|
java.io.InputStream |
openInputStream()
Opens zip entry or plain file and returns its input stream.
|
byte[] |
readBytes()
Reads stream bytes.
|
java.lang.String |
toString() |
public java.lang.String name()
public boolean isArchive()
true
if archive.public java.lang.String archiveName()
null
if entry is not inside archived file.public boolean isTypeSignatureInUse(byte[] bytes)
true
if class contains type signature
.
It searches the class content for bytecode signature. This is the fastest way of finding if come
class uses some type. Please note that if signature exists it still doesn't means that class uses
it in expected way, therefore, class should be loaded to complete the scan.public byte[] readBytes() throws java.io.IOException
java.io.IOException
public java.io.InputStream openInputStream()
public void closeInputStream()
public java.lang.Class loadClass() throws java.lang.ClassNotFoundException
ClassScanner.ignoreException
is set,
no exception is thrown, but null
is returned.java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-present Jodd Team