allocate static method
Pointer<JSClassDefinition>
allocate(
- int version,
- int attributes,
- Pointer<
Utf8> className, - JSClassRef 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,
int /*JSClassAttributes*/ attributes,
Pointer<Utf8> className,
JSClassRef 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,
) {
final Pointer<JSClassDefinition> result = calloc.call(1);
result.ref
..version = version
..attributes = attributes
..className = className
..parentClass = parentClass
..staticValues = staticValues
..staticFunctions = staticFunctions
..initialize = initialize
..finalize = finalize
..hasProperty = hasProperty
..getProperty = getProperty
..setProperty = setProperty
..deleteProperty = deleteProperty
..getPropertyNames = getPropertyNames
..callAsFunction = callAsFunction
..callAsConstructor = callAsConstructor
..hasInstance = hasInstance
..convertToType = convertToType;
return result;
}