From d8b3cfae7a197109b4fa1bcf97372db8e7d49f4e Mon Sep 17 00:00:00 2001 From: Thibaut Lorrain Date: Mon, 24 Jul 2023 10:58:37 +0200 Subject: [PATCH] make get/setValue methods public on IntegerByRef types --- src/bindgen/language_backend/java_jna.rs | 4 +- tests/expectations/alias.java | 8 +-- tests/expectations/annotation.java | 12 ++-- tests/expectations/array.java | 4 +- tests/expectations/asserted_cast.java | 12 ++-- tests/expectations/body.java | 16 ++--- tests/expectations/cfg.java | 12 ++-- tests/expectations/const_transparent.java | 4 +- .../constant_user_defined_type.java | 8 +-- tests/expectations/decl_name_conflicting.java | 4 +- tests/expectations/derive_eq.java | 4 +- tests/expectations/derive_ostream.java | 16 ++--- .../destructor_and_copy_ctor.java | 32 +++++----- tests/expectations/display_list.java | 4 +- tests/expectations/enum.java | 64 +++++++++---------- tests/expectations/enum_discriminant.java | 4 +- tests/expectations/enum_self.java | 4 +- tests/expectations/forward_declaration.java | 4 +- tests/expectations/item_types.java | 4 +- tests/expectations/item_types_renamed.java | 4 +- tests/expectations/lifetime_arg.java | 4 +- tests/expectations/mangle.java | 4 +- tests/expectations/must_use.java | 4 +- tests/expectations/prefix.java | 4 +- tests/expectations/raw_ident.java | 4 +- tests/expectations/rename.java | 4 +- tests/expectations/reserved.java | 12 ++-- tests/expectations/sentinel.java | 12 ++-- tests/expectations/size_types.java | 16 ++--- tests/expectations/transform_op.java | 20 +++--- tests/expectations/transparent.java | 16 ++--- 31 files changed, 162 insertions(+), 162 deletions(-) diff --git a/src/bindgen/language_backend/java_jna.rs b/src/bindgen/language_backend/java_jna.rs index c83f46131..1766a1e9b 100644 --- a/src/bindgen/language_backend/java_jna.rs +++ b/src/bindgen/language_backend/java_jna.rs @@ -210,7 +210,7 @@ fn write_integer_type)>( out.close_brace(false); out.new_line(); out.new_line(); - write!(out, "{} getValue()", name); + write!(out, "public {} getValue()", name); out.open_brace(); write!( out, @@ -221,7 +221,7 @@ fn write_integer_type)>( out.close_brace(false); out.new_line(); out.new_line(); - write!(out, "void setValue({} value)", name); + write!(out, "public void setValue({} value)", name); out.open_brace(); write!(out, "getPointer().{};", jna_underlying_type.set_method()); out.close_brace(false); diff --git a/tests/expectations/alias.java b/tests/expectations/alias.java index 4b31cc5ac..4bebbdb7a 100644 --- a/tests/expectations/alias.java +++ b/tests/expectations/alias.java @@ -36,11 +36,11 @@ public StatusByReference(Pointer p) { setPointer(p); } - Status getValue() { + public Status getValue() { return new Status(getPointer().getInt(0)); } - void setValue(Status value) { + public void setValue(Status value) { getPointer().setInt(0, value.intValue()); } @@ -207,11 +207,11 @@ public UnitByReference(Pointer p) { setPointer(p); } - Unit getValue() { + public Unit getValue() { return new Unit(getPointer().getInt(0)); } - void setValue(Unit value) { + public void setValue(Unit value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/annotation.java b/tests/expectations/annotation.java index f445d76b5..64be20033 100644 --- a/tests/expectations/annotation.java +++ b/tests/expectations/annotation.java @@ -36,11 +36,11 @@ public CByReference(Pointer p) { setPointer(p); } - C getValue() { + public C getValue() { return new C(getPointer().getInt(0)); } - void setValue(C value) { + public void setValue(C value) { getPointer().setInt(0, value.intValue()); } @@ -136,11 +136,11 @@ public FByReference(Pointer p) { setPointer(p); } - F getValue() { + public F getValue() { return new F(getPointer().getInt(0)); } - void setValue(F value) { + public void setValue(F value) { getPointer().setInt(0, value.intValue()); } @@ -174,11 +174,11 @@ public HByReference(Pointer p) { setPointer(p); } - H getValue() { + public H getValue() { return new H(getPointer().getInt(0)); } - void setValue(H value) { + public void setValue(H value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/array.java b/tests/expectations/array.java index 56f12d5f3..6d23f081e 100644 --- a/tests/expectations/array.java +++ b/tests/expectations/array.java @@ -35,11 +35,11 @@ public FooByReference(Pointer p) { setPointer(p); } - Foo getValue() { + public Foo getValue() { return new Foo(getPointer().getInt(0)); } - void setValue(Foo value) { + public void setValue(Foo value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/asserted_cast.java b/tests/expectations/asserted_cast.java index 88120f52c..30a6d4355 100644 --- a/tests/expectations/asserted_cast.java +++ b/tests/expectations/asserted_cast.java @@ -55,11 +55,11 @@ public HByReference(Pointer p) { setPointer(p); } - H getValue() { + public H getValue() { return new H(getPointer().getInt(0)); } - void setValue(H value) { + public void setValue(H value) { getPointer().setInt(0, value.intValue()); } @@ -93,11 +93,11 @@ public JByReference(Pointer p) { setPointer(p); } - J getValue() { + public J getValue() { return new J(getPointer().getInt(0)); } - void setValue(J value) { + public void setValue(J value) { getPointer().setInt(0, value.intValue()); } @@ -131,11 +131,11 @@ public KByReference(Pointer p) { setPointer(p); } - K getValue() { + public K getValue() { return new K(getPointer().getInt(0)); } - void setValue(K value) { + public void setValue(K value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/body.java b/tests/expectations/body.java index 93e5f5157..fc6a2870b 100644 --- a/tests/expectations/body.java +++ b/tests/expectations/body.java @@ -37,11 +37,11 @@ public MyCLikeEnumByReference(Pointer p) { setPointer(p); } - MyCLikeEnum getValue() { + public MyCLikeEnum getValue() { return new MyCLikeEnum(getPointer().getInt(0)); } - void setValue(MyCLikeEnum value) { + public void setValue(MyCLikeEnum value) { getPointer().setInt(0, value.intValue()); } @@ -75,11 +75,11 @@ public MyCLikeEnum_PrependedByReference(Pointer p) { setPointer(p); } - MyCLikeEnum_Prepended getValue() { + public MyCLikeEnum_Prepended getValue() { return new MyCLikeEnum_Prepended(getPointer().getInt(0)); } - void setValue(MyCLikeEnum_Prepended value) { + public void setValue(MyCLikeEnum_Prepended value) { getPointer().setInt(0, value.intValue()); } @@ -143,11 +143,11 @@ public MyFancyEnumByReference(Pointer p) { setPointer(p); } - MyFancyEnum getValue() { + public MyFancyEnum getValue() { return new MyFancyEnum(getPointer().getInt(0)); } - void setValue(MyFancyEnum value) { + public void setValue(MyFancyEnum value) { getPointer().setInt(0, value.intValue()); } @@ -243,11 +243,11 @@ public MyFancyEnum_PrependedByReference(Pointer p) { setPointer(p); } - MyFancyEnum_Prepended getValue() { + public MyFancyEnum_Prepended getValue() { return new MyFancyEnum_Prepended(getPointer().getInt(0)); } - void setValue(MyFancyEnum_Prepended value) { + public void setValue(MyFancyEnum_Prepended value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/cfg.java b/tests/expectations/cfg.java index 720dbf970..5c20ed588 100644 --- a/tests/expectations/cfg.java +++ b/tests/expectations/cfg.java @@ -38,11 +38,11 @@ public BarTypeByReference(Pointer p) { setPointer(p); } - BarType getValue() { + public BarType getValue() { return new BarType(getPointer().getInt(0)); } - void setValue(BarType value) { + public void setValue(BarType value) { getPointer().setInt(0, value.intValue()); } @@ -76,11 +76,11 @@ public FooTypeByReference(Pointer p) { setPointer(p); } - FooType getValue() { + public FooType getValue() { return new FooType(getPointer().getInt(0)); } - void setValue(FooType value) { + public void setValue(FooType value) { getPointer().setInt(0, value.intValue()); } @@ -149,11 +149,11 @@ public CByReference(Pointer p) { setPointer(p); } - C getValue() { + public C getValue() { return new C(getPointer().getInt(0)); } - void setValue(C value) { + public void setValue(C value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/const_transparent.java b/tests/expectations/const_transparent.java index 682fd1b14..dba1b4a0c 100644 --- a/tests/expectations/const_transparent.java +++ b/tests/expectations/const_transparent.java @@ -34,11 +34,11 @@ public TransparentByReference(Pointer p) { setPointer(p); } - Transparent getValue() { + public Transparent getValue() { return new Transparent(getPointer().getByte(0)); } - void setValue(Transparent value) { + public void setValue(Transparent value) { getPointer().setByte(0, (byte)value.intValue()); } diff --git a/tests/expectations/constant_user_defined_type.java b/tests/expectations/constant_user_defined_type.java index 001436115..45f26eea5 100644 --- a/tests/expectations/constant_user_defined_type.java +++ b/tests/expectations/constant_user_defined_type.java @@ -35,11 +35,11 @@ public EByReference(Pointer p) { setPointer(p); } - E getValue() { + public E getValue() { return new E(getPointer().getInt(0)); } - void setValue(E value) { + public void setValue(E value) { getPointer().setInt(0, value.intValue()); } @@ -100,11 +100,11 @@ public AByReference(Pointer p) { setPointer(p); } - A getValue() { + public A getValue() { return new A(getPointer().getByte(0)); } - void setValue(A value) { + public void setValue(A value) { getPointer().setByte(0, (byte)value.intValue()); } diff --git a/tests/expectations/decl_name_conflicting.java b/tests/expectations/decl_name_conflicting.java index 564e108a6..67d7023e9 100644 --- a/tests/expectations/decl_name_conflicting.java +++ b/tests/expectations/decl_name_conflicting.java @@ -36,11 +36,11 @@ public BindingTypeByReference(Pointer p) { setPointer(p); } - BindingType getValue() { + public BindingType getValue() { return new BindingType(getPointer().getInt(0)); } - void setValue(BindingType value) { + public void setValue(BindingType value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/derive_eq.java b/tests/expectations/derive_eq.java index 45737e721..7698fa3f0 100644 --- a/tests/expectations/derive_eq.java +++ b/tests/expectations/derive_eq.java @@ -70,11 +70,11 @@ public BarByReference(Pointer p) { setPointer(p); } - Bar getValue() { + public Bar getValue() { return new Bar(getPointer().getInt(0)); } - void setValue(Bar value) { + public void setValue(Bar value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/derive_ostream.java b/tests/expectations/derive_ostream.java index 991e137ec..bcb839a7f 100644 --- a/tests/expectations/derive_ostream.java +++ b/tests/expectations/derive_ostream.java @@ -36,11 +36,11 @@ public CByReference(Pointer p) { setPointer(p); } - C getValue() { + public C getValue() { return new C(getPointer().getInt(0)); } - void setValue(C value) { + public void setValue(C value) { getPointer().setInt(0, value.intValue()); } @@ -170,11 +170,11 @@ public FByReference(Pointer p) { setPointer(p); } - F getValue() { + public F getValue() { return new F(getPointer().getInt(0)); } - void setValue(F value) { + public void setValue(F value) { getPointer().setInt(0, value.intValue()); } @@ -208,11 +208,11 @@ public HByReference(Pointer p) { setPointer(p); } - H getValue() { + public H getValue() { return new H(getPointer().getInt(0)); } - void setValue(H value) { + public void setValue(H value) { getPointer().setInt(0, value.intValue()); } @@ -245,11 +245,11 @@ public IByReference(Pointer p) { setPointer(p); } - I getValue() { + public I getValue() { return new I(getPointer().getInt(0)); } - void setValue(I value) { + public void setValue(I value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/destructor_and_copy_ctor.java b/tests/expectations/destructor_and_copy_ctor.java index 8a92200ff..6b333831e 100644 --- a/tests/expectations/destructor_and_copy_ctor.java +++ b/tests/expectations/destructor_and_copy_ctor.java @@ -37,11 +37,11 @@ public FillRuleByReference(Pointer p) { setPointer(p); } - FillRule getValue() { + public FillRule getValue() { return new FillRule(getPointer().getInt(0)); } - void setValue(FillRule value) { + public void setValue(FillRule value) { getPointer().setInt(0, value.intValue()); } @@ -194,11 +194,11 @@ public Foo_u32ByReference(Pointer p) { setPointer(p); } - Foo_u32 getValue() { + public Foo_u32 getValue() { return new Foo_u32(getPointer().getInt(0)); } - void setValue(Foo_u32 value) { + public void setValue(Foo_u32 value) { getPointer().setInt(0, value.intValue()); } @@ -267,11 +267,11 @@ public Baz_i32ByReference(Pointer p) { setPointer(p); } - Baz_i32 getValue() { + public Baz_i32 getValue() { return new Baz_i32(getPointer().getInt(0)); } - void setValue(Baz_i32 value) { + public void setValue(Baz_i32 value) { getPointer().setInt(0, value.intValue()); } @@ -305,11 +305,11 @@ public TazByReference(Pointer p) { setPointer(p); } - Taz getValue() { + public Taz getValue() { return new Taz(getPointer().getInt(0)); } - void setValue(Taz value) { + public void setValue(Taz value) { getPointer().setInt(0, value.intValue()); } @@ -342,11 +342,11 @@ public TazzByReference(Pointer p) { setPointer(p); } - Tazz getValue() { + public Tazz getValue() { return new Tazz(getPointer().getInt(0)); } - void setValue(Tazz value) { + public void setValue(Tazz value) { getPointer().setInt(0, value.intValue()); } @@ -379,11 +379,11 @@ public TazzzByReference(Pointer p) { setPointer(p); } - Tazzz getValue() { + public Tazzz getValue() { return new Tazzz(getPointer().getInt(0)); } - void setValue(Tazzz value) { + public void setValue(Tazzz value) { getPointer().setInt(0, value.intValue()); } @@ -416,11 +416,11 @@ public TazzzzByReference(Pointer p) { setPointer(p); } - Tazzzz getValue() { + public Tazzzz getValue() { return new Tazzzz(getPointer().getInt(0)); } - void setValue(Tazzzz value) { + public void setValue(Tazzzz value) { getPointer().setInt(0, value.intValue()); } @@ -453,11 +453,11 @@ public QuxByReference(Pointer p) { setPointer(p); } - Qux getValue() { + public Qux getValue() { return new Qux(getPointer().getInt(0)); } - void setValue(Qux value) { + public void setValue(Qux value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/display_list.java b/tests/expectations/display_list.java index 7c64da66c..61262f5bc 100644 --- a/tests/expectations/display_list.java +++ b/tests/expectations/display_list.java @@ -109,11 +109,11 @@ public DisplayItemByReference(Pointer p) { setPointer(p); } - DisplayItem getValue() { + public DisplayItem getValue() { return new DisplayItem(getPointer().getInt(0)); } - void setValue(DisplayItem value) { + public void setValue(DisplayItem value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/enum.java b/tests/expectations/enum.java index ff2c86f67..906db0492 100644 --- a/tests/expectations/enum.java +++ b/tests/expectations/enum.java @@ -39,11 +39,11 @@ public AByReference(Pointer p) { setPointer(p); } - A getValue() { + public A getValue() { return new A(getPointer().getInt(0)); } - void setValue(A value) { + public void setValue(A value) { getPointer().setInt(0, value.intValue()); } @@ -78,11 +78,11 @@ public BByReference(Pointer p) { setPointer(p); } - B getValue() { + public B getValue() { return new B(getPointer().getInt(0)); } - void setValue(B value) { + public void setValue(B value) { getPointer().setInt(0, value.intValue()); } @@ -117,11 +117,11 @@ public CByReference(Pointer p) { setPointer(p); } - C getValue() { + public C getValue() { return new C(getPointer().getInt(0)); } - void setValue(C value) { + public void setValue(C value) { getPointer().setInt(0, value.intValue()); } @@ -156,11 +156,11 @@ public DByReference(Pointer p) { setPointer(p); } - D getValue() { + public D getValue() { return new D(getPointer().getInt(0)); } - void setValue(D value) { + public void setValue(D value) { getPointer().setInt(0, value.intValue()); } @@ -195,11 +195,11 @@ public EByReference(Pointer p) { setPointer(p); } - E getValue() { + public E getValue() { return new E(getPointer().getInt(0)); } - void setValue(E value) { + public void setValue(E value) { getPointer().setInt(0, value.intValue()); } @@ -234,11 +234,11 @@ public FByReference(Pointer p) { setPointer(p); } - F getValue() { + public F getValue() { return new F(getPointer().getInt(0)); } - void setValue(F value) { + public void setValue(F value) { getPointer().setInt(0, value.intValue()); } @@ -273,11 +273,11 @@ public LByReference(Pointer p) { setPointer(p); } - L getValue() { + public L getValue() { return new L(getPointer().getInt(0)); } - void setValue(L value) { + public void setValue(L value) { getPointer().setInt(0, value.intValue()); } @@ -311,11 +311,11 @@ public MByReference(Pointer p) { setPointer(p); } - M getValue() { + public M getValue() { return new M(getPointer().getInt(0)); } - void setValue(M value) { + public void setValue(M value) { getPointer().setInt(0, value.intValue()); } @@ -350,11 +350,11 @@ public NByReference(Pointer p) { setPointer(p); } - N getValue() { + public N getValue() { return new N(getPointer().getInt(0)); } - void setValue(N value) { + public void setValue(N value) { getPointer().setInt(0, value.intValue()); } @@ -389,11 +389,11 @@ public OByReference(Pointer p) { setPointer(p); } - O getValue() { + public O getValue() { return new O(getPointer().getInt(0)); } - void setValue(O value) { + public void setValue(O value) { getPointer().setInt(0, value.intValue()); } @@ -481,11 +481,11 @@ public GByReference(Pointer p) { setPointer(p); } - G getValue() { + public G getValue() { return new G(getPointer().getInt(0)); } - void setValue(G value) { + public void setValue(G value) { getPointer().setInt(0, value.intValue()); } @@ -519,11 +519,11 @@ public HByReference(Pointer p) { setPointer(p); } - H getValue() { + public H getValue() { return new H(getPointer().getInt(0)); } - void setValue(H value) { + public void setValue(H value) { getPointer().setInt(0, value.intValue()); } @@ -557,11 +557,11 @@ public ExIByReference(Pointer p) { setPointer(p); } - ExI getValue() { + public ExI getValue() { return new ExI(getPointer().getInt(0)); } - void setValue(ExI value) { + public void setValue(ExI value) { getPointer().setInt(0, value.intValue()); } @@ -594,11 +594,11 @@ public PByReference(Pointer p) { setPointer(p); } - P getValue() { + public P getValue() { return new P(getPointer().getInt(0)); } - void setValue(P value) { + public void setValue(P value) { getPointer().setInt(0, value.intValue()); } @@ -631,11 +631,11 @@ public QByReference(Pointer p) { setPointer(p); } - Q getValue() { + public Q getValue() { return new Q(getPointer().getInt(0)); } - void setValue(Q value) { + public void setValue(Q value) { getPointer().setInt(0, value.intValue()); } @@ -669,11 +669,11 @@ public RByReference(Pointer p) { setPointer(p); } - R getValue() { + public R getValue() { return new R(getPointer().getInt(0)); } - void setValue(R value) { + public void setValue(R value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/enum_discriminant.java b/tests/expectations/enum_discriminant.java index 8a9fd7720..10d4eedbe 100644 --- a/tests/expectations/enum_discriminant.java +++ b/tests/expectations/enum_discriminant.java @@ -44,11 +44,11 @@ public EByReference(Pointer p) { setPointer(p); } - E getValue() { + public E getValue() { return new E(getPointer().getInt(0)); } - void setValue(E value) { + public void setValue(E value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/enum_self.java b/tests/expectations/enum_self.java index ab980192b..61f513473 100644 --- a/tests/expectations/enum_self.java +++ b/tests/expectations/enum_self.java @@ -67,11 +67,11 @@ public BarByReference(Pointer p) { setPointer(p); } - Bar getValue() { + public Bar getValue() { return new Bar(getPointer().getInt(0)); } - void setValue(Bar value) { + public void setValue(Bar value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/forward_declaration.java b/tests/expectations/forward_declaration.java index 0446d7d44..5fbee40f9 100644 --- a/tests/expectations/forward_declaration.java +++ b/tests/expectations/forward_declaration.java @@ -69,11 +69,11 @@ public TypeDataByReference(Pointer p) { setPointer(p); } - TypeData getValue() { + public TypeData getValue() { return new TypeData(getPointer().getInt(0)); } - void setValue(TypeData value) { + public void setValue(TypeData value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/item_types.java b/tests/expectations/item_types.java index c11da729c..09e6af32c 100644 --- a/tests/expectations/item_types.java +++ b/tests/expectations/item_types.java @@ -36,11 +36,11 @@ public OnlyThisShouldBeGeneratedByReference(Pointer p) { setPointer(p); } - OnlyThisShouldBeGenerated getValue() { + public OnlyThisShouldBeGenerated getValue() { return new OnlyThisShouldBeGenerated(getPointer().getInt(0)); } - void setValue(OnlyThisShouldBeGenerated value) { + public void setValue(OnlyThisShouldBeGenerated value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/item_types_renamed.java b/tests/expectations/item_types_renamed.java index b68fafef8..b6108649e 100644 --- a/tests/expectations/item_types_renamed.java +++ b/tests/expectations/item_types_renamed.java @@ -36,11 +36,11 @@ public StyleOnlyThisShouldBeGeneratedByReference(Pointer p) { setPointer(p); } - StyleOnlyThisShouldBeGenerated getValue() { + public StyleOnlyThisShouldBeGenerated getValue() { return new StyleOnlyThisShouldBeGenerated(getPointer().getInt(0)); } - void setValue(StyleOnlyThisShouldBeGenerated value) { + public void setValue(StyleOnlyThisShouldBeGenerated value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/lifetime_arg.java b/tests/expectations/lifetime_arg.java index 19b6c3f19..98b4b7de0 100644 --- a/tests/expectations/lifetime_arg.java +++ b/tests/expectations/lifetime_arg.java @@ -66,11 +66,11 @@ public EByReference(Pointer p) { setPointer(p); } - E getValue() { + public E getValue() { return new E(getPointer().getInt(0)); } - void setValue(E value) { + public void setValue(E value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/mangle.java b/tests/expectations/mangle.java index 716e7ad81..ef786fbc8 100644 --- a/tests/expectations/mangle.java +++ b/tests/expectations/mangle.java @@ -36,11 +36,11 @@ public BarByReference(Pointer p) { setPointer(p); } - Bar getValue() { + public Bar getValue() { return new Bar(getPointer().getInt(0)); } - void setValue(Bar value) { + public void setValue(Bar value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/must_use.java b/tests/expectations/must_use.java index da2250199..1e1942d2d 100644 --- a/tests/expectations/must_use.java +++ b/tests/expectations/must_use.java @@ -37,11 +37,11 @@ public MaybeOwnedPtr_i32ByReference(Pointer p) { setPointer(p); } - MaybeOwnedPtr_i32 getValue() { + public MaybeOwnedPtr_i32 getValue() { return new MaybeOwnedPtr_i32(getPointer().getInt(0)); } - void setValue(MaybeOwnedPtr_i32 value) { + public void setValue(MaybeOwnedPtr_i32 value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/prefix.java b/tests/expectations/prefix.java index 79d99f608..560f687a1 100644 --- a/tests/expectations/prefix.java +++ b/tests/expectations/prefix.java @@ -82,11 +82,11 @@ public PREFIX_AbsoluteFontWeightByReference(Pointer p) { setPointer(p); } - PREFIX_AbsoluteFontWeight getValue() { + public PREFIX_AbsoluteFontWeight getValue() { return new PREFIX_AbsoluteFontWeight(getPointer().getInt(0)); } - void setValue(PREFIX_AbsoluteFontWeight value) { + public void setValue(PREFIX_AbsoluteFontWeight value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/raw_ident.java b/tests/expectations/raw_ident.java index 175c89ff5..cf3713c83 100644 --- a/tests/expectations/raw_ident.java +++ b/tests/expectations/raw_ident.java @@ -36,11 +36,11 @@ public EnumByReference(Pointer p) { setPointer(p); } - Enum getValue() { + public Enum getValue() { return new Enum(getPointer().getInt(0)); } - void setValue(Enum value) { + public void setValue(Enum value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/rename.java b/tests/expectations/rename.java index 6302c6d0b..aafbdb337 100644 --- a/tests/expectations/rename.java +++ b/tests/expectations/rename.java @@ -39,11 +39,11 @@ public C_EByReference(Pointer p) { setPointer(p); } - C_E getValue() { + public C_E getValue() { return new C_E(getPointer().getInt(0)); } - void setValue(C_E value) { + public void setValue(C_E value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/reserved.java b/tests/expectations/reserved.java index d0ee4e014..6c1d4609d 100644 --- a/tests/expectations/reserved.java +++ b/tests/expectations/reserved.java @@ -99,11 +99,11 @@ public CByReference(Pointer p) { setPointer(p); } - C getValue() { + public C getValue() { return new C(getPointer().getInt(0)); } - void setValue(C value) { + public void setValue(C value) { getPointer().setInt(0, value.intValue()); } @@ -136,11 +136,11 @@ public EByReference(Pointer p) { setPointer(p); } - E getValue() { + public E getValue() { return new E(getPointer().getInt(0)); } - void setValue(E value) { + public void setValue(E value) { getPointer().setInt(0, value.intValue()); } @@ -173,11 +173,11 @@ public FByReference(Pointer p) { setPointer(p); } - F getValue() { + public F getValue() { return new F(getPointer().getInt(0)); } - void setValue(F value) { + public void setValue(F value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/sentinel.java b/tests/expectations/sentinel.java index cdbc9dda2..3d2e741b4 100644 --- a/tests/expectations/sentinel.java +++ b/tests/expectations/sentinel.java @@ -42,11 +42,11 @@ public AByReference(Pointer p) { setPointer(p); } - A getValue() { + public A getValue() { return new A(getPointer().getInt(0)); } - void setValue(A value) { + public void setValue(A value) { getPointer().setInt(0, value.intValue()); } @@ -85,11 +85,11 @@ public BByReference(Pointer p) { setPointer(p); } - B getValue() { + public B getValue() { return new B(getPointer().getInt(0)); } - void setValue(B value) { + public void setValue(B value) { getPointer().setInt(0, value.intValue()); } @@ -128,11 +128,11 @@ public CByReference(Pointer p) { setPointer(p); } - C getValue() { + public C getValue() { return new C(getPointer().getInt(0)); } - void setValue(C value) { + public void setValue(C value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/size_types.java b/tests/expectations/size_types.java index bb1209427..907bd9fa4 100644 --- a/tests/expectations/size_types.java +++ b/tests/expectations/size_types.java @@ -35,11 +35,11 @@ public IEByReference(Pointer p) { setPointer(p); } - IE getValue() { + public IE getValue() { return new IE(getPointer().getInt(0)); } - void setValue(IE value) { + public void setValue(IE value) { getPointer().setInt(0, value.intValue()); } @@ -71,11 +71,11 @@ public UEByReference(Pointer p) { setPointer(p); } - UE getValue() { + public UE getValue() { return new UE(getPointer().getInt(0)); } - void setValue(UE value) { + public void setValue(UE value) { getPointer().setInt(0, value.intValue()); } @@ -106,11 +106,11 @@ public UsizeByReference(Pointer p) { setPointer(p); } - Usize getValue() { + public Usize getValue() { return new Usize(getPointer().getNativeLong(0).longValue()); } - void setValue(Usize value) { + public void setValue(Usize value) { getPointer().setNativeLong(0, new NativeLong(value.longValue())); } @@ -141,11 +141,11 @@ public IsizeByReference(Pointer p) { setPointer(p); } - Isize getValue() { + public Isize getValue() { return new Isize(getPointer().getNativeLong(0).longValue()); } - void setValue(Isize value) { + public void setValue(Isize value) { getPointer().setNativeLong(0, new NativeLong(value.longValue())); } diff --git a/tests/expectations/transform_op.java b/tests/expectations/transform_op.java index badcee190..fc6bfc72e 100644 --- a/tests/expectations/transform_op.java +++ b/tests/expectations/transform_op.java @@ -102,11 +102,11 @@ public StyleFoo_i32ByReference(Pointer p) { setPointer(p); } - StyleFoo_i32 getValue() { + public StyleFoo_i32 getValue() { return new StyleFoo_i32(getPointer().getInt(0)); } - void setValue(StyleFoo_i32 value) { + public void setValue(StyleFoo_i32 value) { getPointer().setInt(0, value.intValue()); } @@ -141,11 +141,11 @@ public StyleBar_i32ByReference(Pointer p) { setPointer(p); } - StyleBar_i32 getValue() { + public StyleBar_i32 getValue() { return new StyleBar_i32(getPointer().getInt(0)); } - void setValue(StyleBar_i32 value) { + public void setValue(StyleBar_i32 value) { getPointer().setInt(0, value.intValue()); } @@ -212,11 +212,11 @@ public StyleBar_u32ByReference(Pointer p) { setPointer(p); } - StyleBar_u32 getValue() { + public StyleBar_u32 getValue() { return new StyleBar_u32(getPointer().getInt(0)); } - void setValue(StyleBar_u32 value) { + public void setValue(StyleBar_u32 value) { getPointer().setInt(0, value.intValue()); } @@ -250,11 +250,11 @@ public StyleBazByReference(Pointer p) { setPointer(p); } - StyleBaz getValue() { + public StyleBaz getValue() { return new StyleBaz(getPointer().getInt(0)); } - void setValue(StyleBaz value) { + public void setValue(StyleBaz value) { getPointer().setInt(0, value.intValue()); } @@ -288,11 +288,11 @@ public StyleTazByReference(Pointer p) { setPointer(p); } - StyleTaz getValue() { + public StyleTaz getValue() { return new StyleTaz(getPointer().getInt(0)); } - void setValue(StyleTaz value) { + public void setValue(StyleTaz value) { getPointer().setInt(0, value.intValue()); } diff --git a/tests/expectations/transparent.java b/tests/expectations/transparent.java index e768234fd..d5b2b2244 100644 --- a/tests/expectations/transparent.java +++ b/tests/expectations/transparent.java @@ -96,11 +96,11 @@ public TransparentPrimitiveWrappingStructTupleByReference(Pointer p) { setPointer(p); } - TransparentPrimitiveWrappingStructTuple getValue() { + public TransparentPrimitiveWrappingStructTuple getValue() { return new TransparentPrimitiveWrappingStructTuple(getPointer().getInt(0)); } - void setValue(TransparentPrimitiveWrappingStructTuple value) { + public void setValue(TransparentPrimitiveWrappingStructTuple value) { getPointer().setInt(0, value.intValue()); } @@ -157,11 +157,11 @@ public TransparentPrimitiveWrappingStructureByReference(Pointer p) { setPointer(p); } - TransparentPrimitiveWrappingStructure getValue() { + public TransparentPrimitiveWrappingStructure getValue() { return new TransparentPrimitiveWrappingStructure(getPointer().getInt(0)); } - void setValue(TransparentPrimitiveWrappingStructure value) { + public void setValue(TransparentPrimitiveWrappingStructure value) { getPointer().setInt(0, value.intValue()); } @@ -218,11 +218,11 @@ public TransparentPrimitiveWrapper_i32ByReference(Pointer p) { setPointer(p); } - TransparentPrimitiveWrapper_i32 getValue() { + public TransparentPrimitiveWrapper_i32 getValue() { return new TransparentPrimitiveWrapper_i32(getPointer().getInt(0)); } - void setValue(TransparentPrimitiveWrapper_i32 value) { + public void setValue(TransparentPrimitiveWrapper_i32 value) { getPointer().setInt(0, value.intValue()); } @@ -255,11 +255,11 @@ public TransparentPrimitiveWithAssociatedConstantsByReference(Pointer p) { setPointer(p); } - TransparentPrimitiveWithAssociatedConstants getValue() { + public TransparentPrimitiveWithAssociatedConstants getValue() { return new TransparentPrimitiveWithAssociatedConstants(getPointer().getInt(0)); } - void setValue(TransparentPrimitiveWithAssociatedConstants value) { + public void setValue(TransparentPrimitiveWithAssociatedConstants value) { getPointer().setInt(0, value.intValue()); }