jarwar

package
v0.0.0-...-9a26220 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoDecompile

func AutoDecompile(from, to string) error

Decompile 反编译一个 jar包或者 class 返回值是反编译后的 java 文件路径 Example: ``` err = Decompile("test.jar", "test/"); die(err) err = Decompile("test.war", "test/"); die(err) Decompile("a.class", "a.java"); die(err) ```

Types

type JarManifest

type JarManifest struct {
	ManifestVersion       string
	CreatedBy             string
	BuildJdkSpec          string
	SpecificationTitle    string
	SpecificationVersion  string
	SpecificationVendor   string
	ImplementationTitle   string
	ImplementationVersion string
	ImplementationVendor  string
	AutomaticModuleName   string
	BundleDescription     string
	BundleDocURL          string
	BundleLicense         string
	BundleManifestVersion string
	BundleName            string
	BundleSCM             string
	BundleSymbolicName    string
	BundleVendor          string
	BundleVersion         string
	ExportPackage         string
	ImportPackage         string
	PrivatePackage        string
	RequireCapability     string
	BuildTime             time.Time // Added to store build time as a time.Time object
}

func ParseJarManifest

func ParseJarManifest(manifestContent string) JarManifest

Manifest-Version: 1.0 Created-By: Maven JAR Plugin 3.3.0 Build-Jdk-Spec: 17 Specification-Title: Maven Artifact Resolver Transport Wagon Specification-Version: 1.9 Specification-Vendor: The Apache Software Foundation Implementation-Title: Maven Artifact Resolver Transport Wagon Implementation-Version: 1.9.16 Implementation-Vendor: The Apache Software Foundation Automatic-Module-Name: org.apache.maven.resolver.transport.wagon Bundle-Description: A transport implementation based on Maven Wagon. Bundle-DocURL: https://maven.apache.org/resolver/maven-resolver-transport-wagon/ Bundle-License: "Apache-2.0";link="https://www.apache.org/licenses/LICENSE-2.0.txt" Bundle-ManifestVersion: 2 Bundle-Name: Maven Artifact Resolver Transport Wagon Bundle-SCM: url="https://github.com/apache/maven-resolver/tree/maven-resolver-1.9.16/maven-resolver-transport-wagon",connection="scm:git:https://gitbox.apache.org/repos/asf/maven-resolver.git/maven-resolver-transport-wagon",developer-connection="scm:git:https://gitbox.apache.org/repos/asf/maven-resolver.git/maven-resolver-transport-wagon",tag="maven-resolver-1.9.16" Bundle-SymbolicName: org.apache.maven.resolver.transport.wagon Bundle-Vendor: The Apache Software Foundation Bundle-Version: 1.9.16 Export-Package: org.eclipse.aether.transport.wagon;uses:="javax.inject,org.apache.maven.wagon,org.eclipse.aether,org.eclipse.aether.repository,org.eclipse.aether.spi.connector.transport,org.eclipse.aether.spi.locator,org.eclipse.aether.transfer";version="1.9.16" Import-Package: javax.inject,org.apache.maven.wagon,org.apache.maven.wagon.authentication,org.apache.maven.wagon.events,org.apache.maven.wagon.observers,org.apache.maven.wagon.proxy,org.apache.maven.wagon.repository,org.apache.maven.wagon.resource,org.codehaus.plexus,org.codehaus.plexus.classworlds.realm;version="[2.7,3)",org.codehaus.plexus.component.configurator,org.codehaus.plexus.component.configurator.converters.composite,org.codehaus.plexus.component.configurator.converters.lookup,org.codehaus.plexus.component.configurator.expression,org.codehaus.plexus.configuration,org.codehaus.plexus.configuration.xml,org.codehaus.plexus.util.xml,org.eclipse.aether;version="[1.9,2)",org.eclipse.aether.repository;version="[1.9,2)",org.eclipse.aether.spi.connector.transport;version="[1.9,2)",org.eclipse.aether.spi.locator;version="[1.9,2)",org.eclipse.aether.transfer;version="[1.9,2)",org.eclipse.aether.transport.wagon,org.eclipse.aether.util;version="[1.9,2)",org.slf4j;version="[1.7,2)" Private-Package: org.eclipse.aether.internal.transport.wagon Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"

type JarWar

type JarWar struct {
	// License 存储 JAR/WAR 文件中的许可证信息
	// 通常从 META-INF/LICENSE 文件中读取
	License    string
	ManifestMF JarManifest
	// contains filtered or unexported fields
}

func New

func New(compressedFile string) (*JarWar, error)

func NewFromJarFS

func NewFromJarFS(fs *javaclassparser.FS) (*JarWar, error)

func (*JarWar) DumpToLocalFileSystem

func (j *JarWar) DumpToLocalFileSystem(dir string) error

func (*JarWar) GetStructDump

func (j *JarWar) GetStructDump() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL