Documentation ¶
Overview ¶
Package jdbg provides a simpler interface to the jdwp package, offering simple type resolving and method invoking functions.
Index ¶
- func Do(conn *jdwp.Connection, thread jdwp.ThreadID, f func(jdbg *JDbg) error) error
- func Try(f func() error) (err error)
- type Array
- type Class
- func (t *Class) Call(method string, args ...interface{}) Value
- func (t *Class) CastableTo(ty Type) bool
- func (t *Class) Field(name string) Value
- func (t *Class) ID() jdwp.ClassID
- func (t *Class) New(args ...interface{}) Value
- func (t *Class) Signature() string
- func (t *Class) String() string
- func (t *Class) Super() *Class
- type Errors
- type JDbg
- func (j *JDbg) AllClasses() []*Class
- func (j *JDbg) ArrayOf(elTy Type) *Array
- func (j *JDbg) BoolObjectType() *Class
- func (j *JDbg) BoolType() *Simple
- func (j *JDbg) ByteObjectType() *Class
- func (j *JDbg) ByteType() *Simple
- func (j *JDbg) CharObjectType() *Class
- func (j *JDbg) CharType() *Simple
- func (j *JDbg) Class(name string) *Class
- func (j *JDbg) Connection() *jdwp.Connection
- func (j *JDbg) DoubleObjectType() *Class
- func (j *JDbg) DoubleType() *Simple
- func (j *JDbg) FloatObjectType() *Class
- func (j *JDbg) FloatType() *Simple
- func (j *JDbg) GetArgument(name string, index int) Variable
- func (j *JDbg) IntObjectType() *Class
- func (j *JDbg) IntType() *Simple
- func (j *JDbg) LongObjectType() *Class
- func (j *JDbg) LongType() *Simple
- func (j *JDbg) NumberType() *Class
- func (j *JDbg) ObjectType() *Class
- func (j *JDbg) SetVariable(variable Variable, val Value)
- func (j *JDbg) ShortObjectType() *Class
- func (j *JDbg) ShortType() *Simple
- func (j *JDbg) String(val string) Value
- func (j *JDbg) StringType() *Class
- func (j *JDbg) This() Value
- func (j *JDbg) Type(sig string) Type
- type Simple
- type Type
- type Value
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Array ¶
type Array struct { *Class // contains filtered or unexported fields }
Array is the type of an array.
func (*Array) CastableTo ¶
CastableTo returns true if this type can be cast to ty.
type Class ¶
type Class struct {
// contains filtered or unexported fields
}
Class is the type of an object.
func (*Class) CastableTo ¶
CastableTo returns true if this type can be cast to ty.
type JDbg ¶
type JDbg struct {
// contains filtered or unexported fields
}
JDbg is a wrapper around a JDWP connection that provides an easier interface for usage.
func (*JDbg) AllClasses ¶ added in v0.9.0
AllClasses returns all the loaded classes.
func (*JDbg) BoolObjectType ¶
BoolObjectType returns the Java java.lang.Boolean type.
func (*JDbg) ByteObjectType ¶
ByteObjectType returns the Java java.lang.Byte type.
func (*JDbg) CharObjectType ¶
CharObjectType returns the Java java.lang.Character type.
func (*JDbg) Connection ¶ added in v0.9.0
func (j *JDbg) Connection() *jdwp.Connection
Connection returns the JDWP connection.
func (*JDbg) DoubleObjectType ¶
DoubleObjectType returns the Java java.lang.Double type.
func (*JDbg) DoubleType ¶
DoubleType returns the Java double type.
func (*JDbg) FloatObjectType ¶
FloatObjectType returns the Java java.lang.Float type.
func (*JDbg) GetArgument ¶ added in v1.3.1
GetArgument returns the method argument of the given name and index. First, this attempts to retrieve the argument by name, but falls back to looking for the argument by index (e.g. in the case the names have been stripped from the debug info).
func (*JDbg) IntObjectType ¶
IntObjectType returns the Java java.lang.Integer type.
func (*JDbg) LongObjectType ¶
LongObjectType returns the Java java.lang.Long type.
func (*JDbg) NumberType ¶
NumberType returns the Java java.lang.Number type.
func (*JDbg) ObjectType ¶
ObjectType returns the Java java.lang.Object type.
func (*JDbg) SetVariable ¶ added in v1.3.1
SetVariable sets the value of the given variable.
func (*JDbg) ShortObjectType ¶
ShortObjectType returns the Java java.lang.Short type.
func (*JDbg) StringType ¶
StringType returns the Java java.lang.String type.
type Simple ¶
type Simple struct {
// contains filtered or unexported fields
}
Simple is a primitive type.
func (*Simple) CastableTo ¶
CastableTo returns true if this type can be cast to ty.
type Type ¶
type Type interface { // String returns the string representation of the type. String() string // Signature returns the Java signature for the type. Signature() string // CastableTo returns true if this type can be cast to ty. CastableTo(ty Type) bool // Call invokes the static method with the specified arguments. Call(method string, args ...interface{}) Value // contains filtered or unexported methods }
Type represents a Java type.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value holds the value of a call.
func (Value) SetArrayValues ¶
func (v Value) SetArrayValues(values interface{})
SetArrayValues sets the array values to values. This value must be an Array.