Ejemplo n.º 1
0
// Adds a 'local' ref to the JVM for Object, and returns an object that is contains reference
func (self *Environment) NewLocalRef(o *Object) *Object {
	return newObject(C.envNewLocalRef(self.env, o.object))
}
Ejemplo n.º 2
0
// Syntactic sugar around &Class{C.jclass(LocalRef(&Object{C.jobject(class.class)}))}
func (self *Environment) NewLocalClassRef(c *Class) *Class {
	return newClass(C.jclass(C.envNewLocalRef(self.env, c.class)))
}