classfile

package
v0.0.0-...-78cea50 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConstantClass              = 7
	ConstantFieldRef           = 9
	ConstantMethodRef          = 10
	ConstantInterfaceMethodRef = 11
	ConstantString             = 8
	ConstantInteger            = 3
	ConstantFloat              = 4
	ConstantLong               = 5
	ConstantDouble             = 6
	ConstantNameAndType        = 12
	ConstantUtf8               = 1
	ConstantMethodHandle       = 15
	ConstantMethodType         = 16
	ConstantInvokeDynamic      = 18
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeInfo

type AttributeInfo interface {
	// contains filtered or unexported methods
}

type BootstrapMethod

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

type BootstrapMethodsAttribute

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

type ClassFile

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

func Parse

func Parse(classData []byte) (cf *ClassFile, err error)

func (*ClassFile) AccessFlags

func (c *ClassFile) AccessFlags() uint16

func (*ClassFile) ClassName

func (c *ClassFile) ClassName() string

func (*ClassFile) ConstantPool

func (c *ClassFile) ConstantPool() ConstantPool

func (*ClassFile) Fields

func (c *ClassFile) Fields() []*MemberInfo

func (*ClassFile) InterfaceNames

func (c *ClassFile) InterfaceNames() []string

func (*ClassFile) MajorVersion

func (c *ClassFile) MajorVersion() uint16

func (*ClassFile) Methods

func (c *ClassFile) Methods() []*MemberInfo

func (*ClassFile) MinorVersion

func (c *ClassFile) MinorVersion() uint16

func (*ClassFile) SuperClassName

func (c *ClassFile) SuperClassName() string

type ClassReader

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

type CodeAttribute

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

func (*CodeAttribute) Code

func (c *CodeAttribute) Code() []byte

func (*CodeAttribute) ExceptionTable

func (c *CodeAttribute) ExceptionTable() []*ExceptionTableEntry

func (*CodeAttribute) MaxLocals

func (c *CodeAttribute) MaxLocals() uint

func (*CodeAttribute) MaxStack

func (c *CodeAttribute) MaxStack() uint

type ConstantClassInfo

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

func (*ConstantClassInfo) Name

func (c *ConstantClassInfo) Name() string

type ConstantDoubleInfo

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

func (*ConstantDoubleInfo) Value

func (c *ConstantDoubleInfo) Value() float64

type ConstantFieldRefInfo

type ConstantFieldRefInfo struct{ ConstantMemberRefInfo }

type ConstantFloatInfo

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

func (*ConstantFloatInfo) Value

func (c *ConstantFloatInfo) Value() float32

type ConstantInfo

type ConstantInfo interface {
	// contains filtered or unexported methods
}

type ConstantIntegerInfo

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

func (*ConstantIntegerInfo) Value

func (c *ConstantIntegerInfo) Value() int32

type ConstantInterfaceMethodRefInfo

type ConstantInterfaceMethodRefInfo struct{ ConstantMemberRefInfo }

type ConstantInvokeDynamicInfo

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

type ConstantLongInfo

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

func (*ConstantLongInfo) Value

func (c *ConstantLongInfo) Value() int64

type ConstantMemberRefInfo

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

func (*ConstantMemberRefInfo) ClassName

func (c *ConstantMemberRefInfo) ClassName() string

func (*ConstantMemberRefInfo) NameAndDescriptor

func (c *ConstantMemberRefInfo) NameAndDescriptor() (string, string)

type ConstantMethodHandleInfo

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

type ConstantMethodRefInfo

type ConstantMethodRefInfo struct{ ConstantMemberRefInfo }

type ConstantMethodTypeInfo

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

type ConstantNameAndTypeInfo

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

type ConstantPool

type ConstantPool []ConstantInfo

func (ConstantPool) GetClassName

func (c ConstantPool) GetClassName(index uint16) string

func (ConstantPool) GetConstantInfo

func (c ConstantPool) GetConstantInfo(index uint16) ConstantInfo

func (ConstantPool) GetNameAndType

func (c ConstantPool) GetNameAndType(index uint16) (string, string)

func (ConstantPool) GetUtf8

func (c ConstantPool) GetUtf8(index uint16) string

type ConstantStringInfo

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

func (*ConstantStringInfo) String

func (c *ConstantStringInfo) String() string

type ConstantUtf8Info

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

func (*ConstantUtf8Info) Str

func (c *ConstantUtf8Info) Str() string

type ConstantValueAttribute

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

func (*ConstantValueAttribute) ConstantValueIndex

func (c *ConstantValueAttribute) ConstantValueIndex() uint16

type DeprecatedAttribute

type DeprecatedAttribute struct {
	MarkerAttribute
}

type EnclosingMethodAttribute

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

func (*EnclosingMethodAttribute) ClassName

func (c *EnclosingMethodAttribute) ClassName() string

func (*EnclosingMethodAttribute) MethodNameAndDescriptor

func (c *EnclosingMethodAttribute) MethodNameAndDescriptor() (string, string)

type ExceptionTableEntry

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

func (*ExceptionTableEntry) CatchType

func (c *ExceptionTableEntry) CatchType() uint16

func (*ExceptionTableEntry) EndPc

func (c *ExceptionTableEntry) EndPc() uint16

func (*ExceptionTableEntry) HandlerPc

func (c *ExceptionTableEntry) HandlerPc() uint16

func (*ExceptionTableEntry) StartPc

func (c *ExceptionTableEntry) StartPc() uint16

type ExceptionsAttribute

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

func (*ExceptionsAttribute) ExceptionIndexTable

func (c *ExceptionsAttribute) ExceptionIndexTable() []uint16

type FieldInfo

type FieldInfo struct {
	MemberInfo
}

type InnerClassInfo

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

type InnerClassesAttribute

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

type LineNumberTableAttribute

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

func (*LineNumberTableAttribute) GetLineNumber

func (c *LineNumberTableAttribute) GetLineNumber(pc int) int

type LineNumberTableEntry

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

type LocalVariableTableAttribute

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

type LocalVariableTableEntry

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

type LocalVariableTypeTableAttribute

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

type LocalVariableTypeTableEntry

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

type MarkerAttribute

type MarkerAttribute struct{}

type MemberInfo

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

func (*MemberInfo) AccessFlags

func (self *MemberInfo) AccessFlags() uint16

func (*MemberInfo) CodeAttribute

func (self *MemberInfo) CodeAttribute() *CodeAttribute

func (*MemberInfo) ConstantValueAttribute

func (self *MemberInfo) ConstantValueAttribute() *ConstantValueAttribute

func (*MemberInfo) Descriptor

func (self *MemberInfo) Descriptor() string

func (*MemberInfo) Name

func (self *MemberInfo) Name() string

type MethodInfo

type MethodInfo struct {
	MemberInfo
}

type SignatureAttribute

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

func (*SignatureAttribute) Signature

func (c *SignatureAttribute) Signature() string

type SourceFileAttribute

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

func (*SourceFileAttribute) FileName

func (c *SourceFileAttribute) FileName() string

type SyntheticAttribute

type SyntheticAttribute struct {
	MarkerAttribute
}

type UnparsedAttribute

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

func (*UnparsedAttribute) Info

func (c *UnparsedAttribute) Info() []byte

Jump to

Keyboard shortcuts

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