jclass

package
v0.0.0-...-8880984 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessFlags

type AccessFlags uint16

AccessFlags is a mask of flags used to denote access permissions to and properties of this class or interface.

The interpretation of each flag, when set, is specified below:

ACC_PUBLIC      0x0001  Declared public; may be accessed from outside its package.
ACC_FINAL       0x0010  Declared final; no subclasses allowed.
ACC_SUPER       0x0020  Treat superclass methods specially when invoked by the invokespecial instruction.
ACC_INTERFACE   0x0200  Is an interface, not a class.
ACC_ABSTRACT    0x0400  Declared abstract; must not be instantiated.
ACC_SYNTHETIC   0x1000  Declared synthetic; not present in the source code.
ACC_ANNOTATION  0x2000  Declared as an annotation type.
ACC_ENUM        0x4000  Declared as an enum type.
ACC_MODULE      0x8000  Is a module, not a class or interface.

func (AccessFlags) IsAbstract

func (af AccessFlags) IsAbstract() bool

func (AccessFlags) IsAnnotation

func (af AccessFlags) IsAnnotation() bool

func (AccessFlags) IsEnum

func (af AccessFlags) IsEnum() bool

func (AccessFlags) IsFinal

func (af AccessFlags) IsFinal() bool

func (AccessFlags) IsInterface

func (af AccessFlags) IsInterface() bool

func (AccessFlags) IsModule

func (af AccessFlags) IsModule() bool

func (AccessFlags) IsPublic

func (af AccessFlags) IsPublic() bool

func (AccessFlags) IsSuper

func (af AccessFlags) IsSuper() bool

func (AccessFlags) IsSynthetic

func (af AccessFlags) IsSynthetic() bool

type Attribute

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

type ClassConst

type ClassConst struct {
	Name string
}

type CodeAttribute

type CodeAttribute struct {
	MaxStack       uint16
	MaxLocals      uint16
	Code           []byte
	ExceptionTable []ExceptionHandler
	Attrs          []Attribute
}

type Const

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

type Decoder

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

func (*Decoder) Decode

func (d *Decoder) Decode(r io.Reader) (*File, error)

type DescriptorType

type DescriptorType struct {
	Name string
	Kind byte
	Dims int
}

func (DescriptorType) IsReference

func (typ DescriptorType) IsReference() bool

func (DescriptorType) String

func (typ DescriptorType) String() string

type DoubleConst

type DoubleConst struct {
	Value float64
}

type ExceptionHandler

type ExceptionHandler struct {
	StartPC   uint16
	EndPC     uint16
	HandlerPC uint16
	CatchType uint16
}

type Field

type Field struct {
	AccessFlags FieldAccessFlags
	Name        string
	Descriptor  string
	Attrs       []Attribute
}

type FieldAccessFlags

type FieldAccessFlags uint16

type FieldDescriptor

type FieldDescriptor string

func (FieldDescriptor) GetType

func (d FieldDescriptor) GetType() DescriptorType

type FieldrefConst

type FieldrefConst struct {
	ClassName  string
	Name       string
	Descriptor string
}

type File

type File struct {
	Ver           Version
	Consts        []Const
	AccessFlags   AccessFlags
	ThisClassName string
	SuperClass    uint16
	Interfaces    []uint16
	Fields        []Field
	Methods       []Method
	Attrs         []Attribute
}

type FloatConst

type FloatConst struct {
	Value float32
}

type IntConst

type IntConst struct {
	Value int32
}

type LongConst

type LongConst struct {
	Value int64
}

type Method

type Method struct {
	AccessFlags MethodAccessFlags
	Name        string
	Descriptor  string
	Attrs       []Attribute
}

type MethodAccessFlags

type MethodAccessFlags uint16

MethodAccessFlags is a mask of flags used to denote access permission to and properties of this method.

The interpretation of each flag, when set, is specified below:

ACC_PUBLIC        0x0001  Declared public; may be accessed from outside its package.
ACC_PRIVATE       0x0002  Declared private; accessible only within the defining class and other classes belonging to the same nest.
ACC_PROTECTED     0x0004  Declared protected; may be accessed within subclasses.
ACC_STATIC        0x0008  Declared static.
ACC_FINAL         0x0010  Declared final; must not be overridden.
ACC_SYNCHRONIZED  0x0020  Declared synchronized; invocation is wrapped by a monitor use.
ACC_BRIDGE        0x0040  A bridge method, generated by the compiler.
ACC_VARARGS       0x0080  Declared with variable number of arguments.
ACC_NATIVE        0x0100  Declared native; implemented in a language other than the Java programming language.
ACC_ABSTRACT      0x0400  Declared abstract; no implementation is provided.
ACC_STRICT        0x0800  Declared strictfp; floating-point mode is FP-strict.
ACC_SYNTHETIC     0x1000  Declared synthetic; not present in the source code.

func (MethodAccessFlags) IsAbstract

func (af MethodAccessFlags) IsAbstract() bool

func (MethodAccessFlags) IsBridge

func (af MethodAccessFlags) IsBridge() bool

func (MethodAccessFlags) IsFinal

func (af MethodAccessFlags) IsFinal() bool

func (MethodAccessFlags) IsNative

func (af MethodAccessFlags) IsNative() bool

func (MethodAccessFlags) IsPrivate

func (af MethodAccessFlags) IsPrivate() bool

func (MethodAccessFlags) IsProtected

func (af MethodAccessFlags) IsProtected() bool

func (MethodAccessFlags) IsPublic

func (af MethodAccessFlags) IsPublic() bool

func (MethodAccessFlags) IsStatic

func (af MethodAccessFlags) IsStatic() bool

func (MethodAccessFlags) IsStrict

func (af MethodAccessFlags) IsStrict() bool

func (MethodAccessFlags) IsSynchronized

func (af MethodAccessFlags) IsSynchronized() bool

func (MethodAccessFlags) IsSynthetic

func (af MethodAccessFlags) IsSynthetic() bool

func (MethodAccessFlags) IsVarargs

func (af MethodAccessFlags) IsVarargs() bool

type MethodDescriptor

type MethodDescriptor string

func (MethodDescriptor) ReturnType

func (d MethodDescriptor) ReturnType() DescriptorType

func (MethodDescriptor) SignatureString

func (d MethodDescriptor) SignatureString(name string) string

func (MethodDescriptor) WalkParams

func (d MethodDescriptor) WalkParams(visit func(typ DescriptorType))

type MethodrefConst

type MethodrefConst struct {
	ClassName  string
	Name       string
	Descriptor string
}

type NameAndTypeConst

type NameAndTypeConst struct {
	Name       string
	Descriptor string
}

type RawAttribute

type RawAttribute struct {
	NameIndex uint16
	Data      []byte
}

type StackMapFrame

type StackMapFrame struct {
	Offset     uint32
	StackDepth uint16
}

type StackMapTableAttribute

type StackMapTableAttribute struct {
	Frames []StackMapFrame
}

type Utf8Const

type Utf8Const struct {
	Value string
}

type Version

type Version struct {
	Minor uint16
	Major uint16
}

Jump to

Keyboard shortcuts

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