public class JarStructure extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
jarLocation
Location of JAR file which structure is represented by this object.
|
protected JarEntry |
root
Root
JarEntry. |
| Constructor and Description |
|---|
JarStructure(Class jarClass)
Constructs new
JarStructure. |
JarStructure(Class jarClass,
List<String> allowedExtensions,
List<String> allowedPackages)
Constructs new
JarStructure. |
JarStructure(Class jarClass,
List<String> allowedExtensions,
List<String> allowedPackages,
FileDownloadListener listener)
Constructs new
JarStructure. |
| Modifier and Type | Method and Description |
|---|---|
JarEntry |
findChildByName(String name)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
JarEntry |
findChildByName(String name,
boolean recursively)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
JarEntry |
getChildByName(String name)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
JarEntry |
getChildByName(String name,
boolean recursively)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
List<JarEntry> |
getChildEntries()
|
JarEntry |
getClassEntry(Class<?> forClass)
|
String |
getJarLocation()
Returns JAR file location.
|
JarEntry |
getPackageEntry(Package forPackage)
|
JarEntry |
getPackageEntry(String forPackage)
|
JarEntry |
getRoot()
Returns root
JarEntry of JarEntryType.JAR representing JAR itself. |
void |
setClassIcon(Class<?> forClass,
Icon icon)
|
void |
setPackageIcon(Package forPackage,
Icon icon)
|
void |
setPackageIcon(String forPackage,
Icon icon)
|
@NotNull protected final String jarLocation
public JarStructure(@NotNull Class jarClass)
JarStructure.jarClass - any class within the JARpublic JarStructure(@NotNull Class jarClass, @Nullable List<String> allowedExtensions, @Nullable List<String> allowedPackages)
JarStructure.jarClass - any class within the JARallowedExtensions - list of extension filtersallowedPackages - list of allowed packagespublic JarStructure(@NotNull Class jarClass, @Nullable List<String> allowedExtensions, @Nullable List<String> allowedPackages, @Nullable FileDownloadListener listener)
JarStructure.jarClass - any class within the JARallowedExtensions - list of extension filtersallowedPackages - list of allowed packageslistener - FileDownloadListener for JAR file@NotNull public String getJarLocation()
@NotNull public JarEntry getRoot()
JarEntry of JarEntryType.JAR representing JAR itself.JarEntry of JarEntryType.JAR representing JAR itself@NotNull public JarEntry getChildByName(@Nullable String name)
JarEntry with the specfiied name or null if it cannot be found.@NotNull public JarEntry getChildByName(@Nullable String name, boolean recursively)
JarEntry with the specfiied name or null if it cannot be found.@Nullable public JarEntry findChildByName(@Nullable String name)
JarEntry with the specfiied name or null if it cannot be found.@Nullable public JarEntry findChildByName(@Nullable String name, boolean recursively)
JarEntry with the specfiied name or null if it cannot be found.Copyright © 2020. All rights reserved.