classpath

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Classpath

type Classpath struct {
	// contains filtered or unexported fields
}

func Parse

func Parse(jreOption, cpOption string) *Classpath

将-Xjre 和 class 两个字段进行解析 xJre : 启动类和扩展类路径 cp/classpath : 用户类路径

func (Classpath) ReadClass

func (self Classpath) ReadClass(classpath string) ([]byte, Entry, error)

在classpath 中查找 Class文件

func (Classpath) String

func (self Classpath) String() string

toString() 打印用户类得路径

type CompositeEntry

type CompositeEntry []Entry

多个Entry组合

func (CompositeEntry) String

func (self CompositeEntry) String() string

toString() 方法 调用每一个子类entry的String()即可

type DirEntry

type DirEntry struct {
	// contains filtered or unexported fields
}

func (*DirEntry) String

func (self *DirEntry) String() string

返回目录信息

type Entry

type Entry interface {

	/*
		相当Java中的toString()方法
	*/
	String() string
	// contains filtered or unexported methods
}

* 加载器的接口 加载器主要功能:根据类名查找class文件

type ZipEntry

type ZipEntry struct {
	// contains filtered or unexported fields
}

func (*ZipEntry) String

func (self *ZipEntry) String() string

Jump to

Keyboard shortcuts

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