def __new__(cls, *args, **kwargs): if cls != JObject: return super(JObject, cls).__new__(cls) # Create a null pointer object if len(args) == 0: args = [None] cls = _JObjectFactory(*args, **kwargs) self = cls.__new__(cls, args[0]) self.__javavalue__ = _jpype.PyJPValue(cls.__javaclass__, args[0]) return self
def init(self, v): if v is not None: self._pyv = v self.__javavalue__ = _jpype.PyJPValue(self.__javaclass__, v) else: self.__javavalue__ = None
def runValueEntry(): # fails as no JVM is running yet _jpype.PyJPValue()
def testValueInitBad2(self): with self.assertRaises(TypeError): _jpype.PyJPValue("no", "no")