I am trying to register a User Defined Function with Esper API. It take a class or string type arguement
class MyUdf():
@staticmethod
def udf():
return 50
conf.addImport(myudf.getClass().getName())
The error message
AttributeError: class MyUdf has no attribute 'getClass'
I can import java class by
from java.lang import Math
conf.addImport(Math)
@larsmans: class seems only exists in Java Class class
class MyUdf():
@staticmethod
def udf():
return 50
def main():
a = 'abc'
print a.__class__
u = MyUdf
print u.__class__
Traceback (most recent call last):
line 79, in main print u.__class__ AttributeError: class MyUdf has no attribute '__class__'