allocate static method
Pointer<JSClassDefinition>
allocate({
- int version = 0,
- int attributes = JSClassAttributes.kJSClassAttributeNone,
- required Pointer<
Utf8> className, - Pointer<
NativeType> ? parentClass, - Pointer<
JSStaticValue> ? staticValues, - Pointer<
JSStaticFunction> ? staticFunctions, - Pointer<
NativeFunction< ? initialize,JSObjectInitializeCallback> > - Pointer<
NativeFunction< ? finalize,JSObjectFinalizeCallback> > - Pointer<
NativeFunction< ? hasProperty,JSObjectHasPropertyCallback> > - Pointer<
NativeFunction< ? getProperty,JSObjectGetPropertyCallback> > - Pointer<
NativeFunction< ? setProperty,JSObjectSetPropertyCallback> > - Pointer<
NativeFunction< ? deleteProperty,JSObjectDeletePropertyCallback> > - Pointer<
NativeFunction< ? getPropertyNames,JSObjectGetPropertyNamesCallback> > - Pointer<
NativeFunction< ? callAsFunction,JSObjectCallAsFunctionCallback> > - Pointer<
NativeFunction< ? callAsConstructor,JSObjectCallAsConstructorCallback> > - Pointer<
NativeFunction< ? hasInstance,JSObjectHasInstanceCallback> > - Pointer<
NativeFunction< ? convertToType,JSObjectConvertToTypeCallback> >
Implementation
static Pointer<JSClassDefinition> allocate({
int version = 0,
int attributes = JSClassAttributes.kJSClassAttributeNone,
required Pointer<Utf8> className,
Pointer? parentClass,
Pointer<JSStaticValue>? staticValues,
Pointer<JSStaticFunction>? staticFunctions,
Pointer<NativeFunction<JSObjectInitializeCallback>>? initialize,
Pointer<NativeFunction<JSObjectFinalizeCallback>>? finalize,
Pointer<NativeFunction<JSObjectHasPropertyCallback>>? hasProperty,
Pointer<NativeFunction<JSObjectGetPropertyCallback>>? getProperty,
Pointer<NativeFunction<JSObjectSetPropertyCallback>>? setProperty,
Pointer<NativeFunction<JSObjectDeletePropertyCallback>>? deleteProperty,
Pointer<NativeFunction<JSObjectGetPropertyNamesCallback>>? getPropertyNames,
Pointer<NativeFunction<JSObjectCallAsFunctionCallback>>? callAsFunction,
Pointer<NativeFunction<JSObjectCallAsConstructorCallback>>?
callAsConstructor,
Pointer<NativeFunction<JSObjectHasInstanceCallback>>? hasInstance,
Pointer<NativeFunction<JSObjectConvertToTypeCallback>>? convertToType,
}) {
return malloc.call<JSClassDefinition>(1)
..ref.version = version
..ref.attributes = attributes
..ref.className = className
..ref.parentClass = parentClass ?? nullptr
..ref.staticValues = staticValues ?? nullptr
..ref.staticFunctions = staticFunctions ?? nullptr
..ref.initialize = initialize ?? nullptr
..ref.finalize = finalize ?? nullptr
..ref.hasProperty = hasProperty ?? nullptr
..ref.getProperty = getProperty ?? nullptr
..ref.setProperty = setProperty ?? nullptr
..ref.deleteProperty = deleteProperty ?? nullptr
..ref.getPropertyNames = getPropertyNames ?? nullptr
..ref.callAsFunction = callAsFunction ?? nullptr
..ref.callAsConstructor = callAsConstructor ?? nullptr
..ref.hasInstance = hasInstance ?? nullptr
..ref.convertToType = convertToType ?? nullptr;
}