public class JarContext extends Object
| Constructor and Description |
|---|
JarContext(String jarFilePath,
String name,
VersionInfo versionInfo,
Manifest manifest,
Attributes attributes) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(Attributes.Name attributeName) |
String |
getAttribute(String attributeName) |
Attributes |
getAttributes() |
List<String> |
getClassNames()
通过所有class文件的路径,获取JAR包中所有类的类路径列表
|
Set<String> |
getClassPackages(int numberOfTheDot)
获取JAR里面的类的包名集合
|
JarFile |
getJarFile() |
String |
getJarFilePath() |
Manifest |
getManifest() |
String |
getName() |
org.springframework.core.io.Resource |
getResource(String locationPattern)
在JAR包中检索单个资源
|
org.springframework.core.io.Resource[] |
getResources(String locationPattern)
在JAR包中检索资源
|
VersionInfo |
getVersionInfo() |
void |
setVersion(String version) |
void |
setVersionInfo(VersionInfo versionInfo) |
public JarContext(String jarFilePath, String name, VersionInfo versionInfo, Manifest manifest, Attributes attributes)
public String getJarFilePath()
public String getName()
public VersionInfo getVersionInfo()
public void setVersionInfo(VersionInfo versionInfo)
public void setVersion(String version)
public Manifest getManifest()
public Attributes getAttributes()
public String getAttribute(Attributes.Name attributeName)
public JarFile getJarFile()
@NonNull public org.springframework.core.io.Resource[] getResources(String locationPattern)
locationPattern - 资源路径匹配串@Nullable public org.springframework.core.io.Resource getResource(String locationPattern)
locationPattern - 资源路径匹配串@NonNull public List<String> getClassNames()
Copyright © 2021–2022 EasyJ????. All rights reserved.