Beispiel #1
0
func (self *Class) copyMethods(cf *classfile.ClassFile) {
	self.methods = make([]*Method, len(cf.Methods()))
	for i, methodInfo := range cf.Methods() {
		self.methods[i] = newMethod(self, methodInfo)
		self.methods[i].slot = uint(i)
	}
}
Beispiel #2
0
func handleClassfile(cf *classfile.ClassFile) {
	for _, m := range cf.Methods() {
		if isNative(m) {
			if isStatic(m) {
				fmt.Printf("%v.%v%v\n", cf.ClassName(), m.Name(), m.Descriptor())
			} else {
				fmt.Printf("%v#%v%v\n", cf.ClassName(), m.Name(), m.Descriptor())
			}
		}
	}
}