Package icu.easyj.core.util.jar
Class JarContext
java.lang.Object
icu.easyj.core.util.jar.JarContext
加载JAR信息时的上下文
- Author:
- wangliang181230
-
Constructor Summary
ConstructorsConstructorDescriptionJarContext(String jarFilePath, String name, VersionInfo versionInfo, Manifest manifest, Attributes attributes) -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String attributeName) getAttribute(Attributes.Name attributeName) 通过所有class文件的路径,获取JAR包中所有类的类路径列表getClassPackages(int numberOfTheDot) 获取JAR里面的类的包名集合getName()org.springframework.core.io.ResourcegetResource(String locationPattern) 在JAR包中检索单个资源org.springframework.core.io.Resource[]getResources(String locationPattern) 在JAR包中检索资源voidsetVersion(String version) voidsetVersionInfo(VersionInfo versionInfo)
-
Constructor Details
-
JarContext
public JarContext(String jarFilePath, String name, VersionInfo versionInfo, Manifest manifest, Attributes attributes)
-
-
Method Details
-
getJarFilePath
-
getName
-
getVersionInfo
-
setVersionInfo
-
setVersion
-
getManifest
-
getAttributes
-
getAttribute
-
getAttribute
-
getJarFile
-
getResources
在JAR包中检索资源- Parameters:
locationPattern- 资源路径匹配串- Returns:
- resources 资源列表
-
getResource
在JAR包中检索单个资源- Parameters:
locationPattern- 资源路径匹配串- Returns:
- resource 目标资源
-
getClassNames
通过所有class文件的路径,获取JAR包中所有类的类路径列表- Returns:
- classNames 类路径列表
-
getClassPackages
获取JAR里面的类的包名集合- Parameters:
numberOfTheDot- 获取包里面第n个点前面的内容- Returns:
- 包集合
-