@@ -109,11 +109,7 @@ private QueryInterface() {
109109 }
110110
111111 /**
112- * The function pointer signature, expressed as a functional interface
113112 */
114- public interface Function {
115- int apply (MemorySegment _x0 , MemorySegment _x1 , MemorySegment _x2 );
116- }
117113
118114 private static final FunctionDescriptor $DESC = FunctionDescriptor .of (
119115 IOKit .C_INT ,
@@ -129,15 +125,6 @@ public static FunctionDescriptor descriptor() {
129125 return $DESC ;
130126 }
131127
132- private static final MethodHandle UP$MH = IOKit .upcallHandle (QueryInterface .Function .class , "apply" , $DESC );
133-
134- /**
135- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
136- * The lifetime of the returned segment is managed by {@code arena}
137- */
138- public static MemorySegment allocate (QueryInterface .Function fi , Arena arena ) {
139- return Linker .nativeLinker ().upcallStub (UP$MH .bindTo (fi ), $DESC , arena );
140- }
141128
142129 private static final MethodHandle DOWN$MH = Linker .nativeLinker ().downcallHandle ($DESC );
143130
@@ -211,11 +198,7 @@ private AddRef() {
211198 }
212199
213200 /**
214- * The function pointer signature, expressed as a functional interface
215201 */
216- public interface Function {
217- int apply (MemorySegment _x0 );
218- }
219202
220203 private static final FunctionDescriptor $DESC = FunctionDescriptor .of (
221204 IOKit .C_INT ,
@@ -229,15 +212,6 @@ public static FunctionDescriptor descriptor() {
229212 return $DESC ;
230213 }
231214
232- private static final MethodHandle UP$MH = IOKit .upcallHandle (AddRef .Function .class , "apply" , $DESC );
233-
234- /**
235- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
236- * The lifetime of the returned segment is managed by {@code arena}
237- */
238- public static MemorySegment allocate (AddRef .Function fi , Arena arena ) {
239- return Linker .nativeLinker ().upcallStub (UP$MH .bindTo (fi ), $DESC , arena );
240- }
241215
242216 private static final MethodHandle DOWN$MH = Linker .nativeLinker ().downcallHandle ($DESC );
243217
@@ -311,11 +285,7 @@ private Release() {
311285 }
312286
313287 /**
314- * The function pointer signature, expressed as a functional interface
315288 */
316- public interface Function {
317- int apply (MemorySegment _x0 );
318- }
319289
320290 private static final FunctionDescriptor $DESC = FunctionDescriptor .of (
321291 IOKit .C_INT ,
@@ -329,15 +299,6 @@ public static FunctionDescriptor descriptor() {
329299 return $DESC ;
330300 }
331301
332- private static final MethodHandle UP$MH = IOKit .upcallHandle (Release .Function .class , "apply" , $DESC );
333-
334- /**
335- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
336- * The lifetime of the returned segment is managed by {@code arena}
337- */
338- public static MemorySegment allocate (Release .Function fi , Arena arena ) {
339- return Linker .nativeLinker ().upcallStub (UP$MH .bindTo (fi ), $DESC , arena );
340- }
341302
342303 private static final MethodHandle DOWN$MH = Linker .nativeLinker ().downcallHandle ($DESC );
343304
@@ -499,11 +460,7 @@ private Probe() {
499460 }
500461
501462 /**
502- * The function pointer signature, expressed as a functional interface
503463 */
504- public interface Function {
505- int apply (MemorySegment _x0 , MemorySegment _x1 , int _x2 , MemorySegment _x3 );
506- }
507464
508465 private static final FunctionDescriptor $DESC = FunctionDescriptor .of (
509466 IOKit .C_INT ,
@@ -520,15 +477,6 @@ public static FunctionDescriptor descriptor() {
520477 return $DESC ;
521478 }
522479
523- private static final MethodHandle UP$MH = IOKit .upcallHandle (Probe .Function .class , "apply" , $DESC );
524-
525- /**
526- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
527- * The lifetime of the returned segment is managed by {@code arena}
528- */
529- public static MemorySegment allocate (Probe .Function fi , Arena arena ) {
530- return Linker .nativeLinker ().upcallStub (UP$MH .bindTo (fi ), $DESC , arena );
531- }
532480
533481 private static final MethodHandle DOWN$MH = Linker .nativeLinker ().downcallHandle ($DESC );
534482
@@ -602,11 +550,7 @@ private Start() {
602550 }
603551
604552 /**
605- * The function pointer signature, expressed as a functional interface
606553 */
607- public interface Function {
608- int apply (MemorySegment _x0 , MemorySegment _x1 , int _x2 );
609- }
610554
611555 private static final FunctionDescriptor $DESC = FunctionDescriptor .of (
612556 IOKit .C_INT ,
@@ -622,15 +566,6 @@ public static FunctionDescriptor descriptor() {
622566 return $DESC ;
623567 }
624568
625- private static final MethodHandle UP$MH = IOKit .upcallHandle (Start .Function .class , "apply" , $DESC );
626-
627- /**
628- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
629- * The lifetime of the returned segment is managed by {@code arena}
630- */
631- public static MemorySegment allocate (Start .Function fi , Arena arena ) {
632- return Linker .nativeLinker ().upcallStub (UP$MH .bindTo (fi ), $DESC , arena );
633- }
634569
635570 private static final MethodHandle DOWN$MH = Linker .nativeLinker ().downcallHandle ($DESC );
636571
@@ -704,11 +639,7 @@ private Stop() {
704639 }
705640
706641 /**
707- * The function pointer signature, expressed as a functional interface
708642 */
709- public interface Function {
710- int apply (MemorySegment _x0 );
711- }
712643
713644 private static final FunctionDescriptor $DESC = FunctionDescriptor .of (
714645 IOKit .C_INT ,
@@ -722,15 +653,6 @@ public static FunctionDescriptor descriptor() {
722653 return $DESC ;
723654 }
724655
725- private static final MethodHandle UP$MH = IOKit .upcallHandle (Stop .Function .class , "apply" , $DESC );
726-
727- /**
728- * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
729- * The lifetime of the returned segment is managed by {@code arena}
730- */
731- public static MemorySegment allocate (Stop .Function fi , Arena arena ) {
732- return Linker .nativeLinker ().upcallStub (UP$MH .bindTo (fi ), $DESC , arena );
733- }
734656
735657 private static final MethodHandle DOWN$MH = Linker .nativeLinker ().downcallHandle ($DESC );
736658
0 commit comments