Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1484,15 +1484,15 @@ public void WriteProperty (Property property, GenBase gen, string indent, bool w
writer.WriteLine ("{0}{1}{2} unsafe {3} {4} {{", indent, visibility, virtual_override, opt.GetOutputName (property.Getter.ReturnType), decl_name);
if (gen.IsGeneratable)
writer.WriteLine ("{0}\t// Metadata.xml XPath method reference: path=\"{1}/method[@name='{2}'{3}]\"", indent, gen.MetadataXPathReference, property.Getter.JavaName, property.Getter.Parameters.GetMethodXPathPredicate ());
writer.WriteLine ("{0}\t[Register (\"{1}\", \"{2}\", \"{3}\"{4})]", indent, property.Getter.JavaName, property.Getter.JniSignature, property.Getter.GetConnectorNameFull (opt), property.Getter.AdditionalAttributeString ());
writer.WriteLine ("{0}\t[Register (\"{1}\", \"{2}\", \"{3}\"{4})]", indent, property.Getter.JavaName, property.Getter.JniSignature, property.Getter.IsVirtual ? property.Getter.GetConnectorNameFull (opt) : string.Empty, property.Getter.AdditionalAttributeString ());
writer.WriteLine ("{0}\tget {{", indent);
WriteMethodBody (property.Getter, indent + "\t\t", gen);
writer.WriteLine ("{0}\t}}", indent);
if (property.Setter != null) {
if (gen.IsGeneratable)
writer.WriteLine ("{0}\t// Metadata.xml XPath method reference: path=\"{1}/method[@name='{2}'{3}]\"", indent, gen.MetadataXPathReference, property.Setter.JavaName, property.Setter.Parameters.GetMethodXPathPredicate ());
WriteMethodCustomAttributes (property.Setter, indent);
writer.WriteLine ("{0}\t[Register (\"{1}\", \"{2}\", \"{3}\"{4})]", indent, property.Setter.JavaName, property.Setter.JniSignature, property.Setter.GetConnectorNameFull (opt), property.Setter.AdditionalAttributeString ());
writer.WriteLine ("{0}\t[Register (\"{1}\", \"{2}\", \"{3}\"{4})]", indent, property.Setter.JavaName, property.Setter.JniSignature, property.Setter.IsVirtual ? property.Setter.GetConnectorNameFull (opt) : string.Empty, property.Setter.AdditionalAttributeString ());
writer.WriteLine ("{0}\tset {{", indent);
string pname = property.Setter.Parameters [0].Name;
property.Setter.Parameters [0].Name = "value";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public partial class MyClass {

public static unsafe int StaticCount {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
[Register ("get_StaticCount", "()I", "Getget_StaticCountHandler")]
[Register ("get_StaticCount", "()I", "")]
get {
const string __id = "get_StaticCount.()I";
try {
Expand All @@ -178,7 +178,7 @@ public partial class MyClass {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_StaticCount", "(I)V", "Getset_StaticCount_IHandler")]
[Register ("set_StaticCount", "(I)V", "")]
set {
const string __id = "set_StaticCount.(I)V";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public virtual unsafe string Key {

public static unsafe int StaticCount {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
[Register ("get_StaticCount", "()I", "Getget_StaticCountHandler")]
[Register ("get_StaticCount", "()I", "")]
get {
const string __id = "get_StaticCount.()I";
try {
Expand All @@ -125,7 +125,7 @@ public static unsafe int StaticCount {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_StaticCount", "(I)V", "Getset_StaticCount_IHandler")]
[Register ("set_StaticCount", "(I)V", "")]
set {
const string __id = "set_StaticCount.(I)V";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial interface IMyInterface : IJavaObject, IJavaPeerable {

static unsafe int Value {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_Value' and count(parameter)=0]"
[Register ("get_Value", "()I", "Getget_ValueHandler")]
[Register ("get_Value", "()I", "")]
get {
const string __id = "get_Value.()I";
try {
Expand All @@ -15,7 +15,7 @@ public partial interface IMyInterface : IJavaObject, IJavaPeerable {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_Value' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_Value", "(I)V", "Getset_Value_IHandler")]
[Register ("set_Value", "(I)V", "")]
set {
const string __id = "set_Value.(I)V";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public partial class MyClass {

public static unsafe int StaticCount {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
[Register ("get_StaticCount", "()I", "Getget_StaticCountHandler")]
[Register ("get_StaticCount", "()I", "")]
get {
const string __id = "get_StaticCount.()I";
try {
Expand All @@ -178,7 +178,7 @@ public partial class MyClass {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_StaticCount", "(I)V", "Getset_StaticCount_IHandler")]
[Register ("set_StaticCount", "(I)V", "")]
set {
const string __id = "set_StaticCount.(I)V";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public virtual unsafe string Key {

public static unsafe int StaticCount {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
[Register ("get_StaticCount", "()I", "Getget_StaticCountHandler")]
[Register ("get_StaticCount", "()I", "")]
get {
const string __id = "get_StaticCount.()I";
try {
Expand All @@ -125,7 +125,7 @@ public static unsafe int StaticCount {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_StaticCount", "(I)V", "Getset_StaticCount_IHandler")]
[Register ("set_StaticCount", "(I)V", "")]
set {
const string __id = "set_StaticCount.(I)V";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public partial interface IMyInterface : IJavaObject, IJavaPeerable {

static unsafe int Value {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='get_Value' and count(parameter)=0]"
[Register ("get_Value", "()I", "Getget_ValueHandler")]
[Register ("get_Value", "()I", "")]
get {
const string __id = "get_Value.()I";
try {
Expand All @@ -15,7 +15,7 @@ public partial interface IMyInterface : IJavaObject, IJavaPeerable {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/interface[@name='IMyInterface']/method[@name='set_Value' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_Value", "(I)V", "Getset_Value_IHandler")]
[Register ("set_Value", "(I)V", "")]
set {
const string __id = "set_Value.(I)V";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public partial class MyClass {
static IntPtr id_set_StaticCount_I;
public static unsafe int StaticCount {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
[Register ("get_StaticCount", "()I", "Getget_StaticCountHandler")]
[Register ("get_StaticCount", "()I", "")]
get {
if (id_get_StaticCount == IntPtr.Zero)
id_get_StaticCount = JNIEnv.GetStaticMethodID (class_ref, "get_StaticCount", "()I");
Expand All @@ -222,7 +222,7 @@ public partial class MyClass {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_StaticCount", "(I)V", "Getset_StaticCount_IHandler")]
[Register ("set_StaticCount", "(I)V", "")]
set {
if (id_set_StaticCount_I == IntPtr.Zero)
id_set_StaticCount_I = JNIEnv.GetStaticMethodID (class_ref, "set_StaticCount", "(I)V");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static IntPtr id_get_StaticCount;
static IntPtr id_set_StaticCount_I;
public static unsafe int StaticCount {
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='get_StaticCount' and count(parameter)=0]"
[Register ("get_StaticCount", "()I", "Getget_StaticCountHandler")]
[Register ("get_StaticCount", "()I", "")]
get {
if (id_get_StaticCount == IntPtr.Zero)
id_get_StaticCount = JNIEnv.GetStaticMethodID (class_ref, "get_StaticCount", "()I");
Expand All @@ -149,7 +149,7 @@ public static unsafe int StaticCount {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='java.code']/class[@name='MyClass']/method[@name='set_StaticCount' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("set_StaticCount", "(I)V", "Getset_StaticCount_IHandler")]
[Register ("set_StaticCount", "(I)V", "")]
set {
if (id_set_StaticCount_I == IntPtr.Zero)
id_set_StaticCount_I = JNIEnv.GetStaticMethodID (class_ref, "set_StaticCount", "(I)V");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base

public static unsafe int SomeInteger {
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeInteger' and count(parameter)=0]"
[Register ("getSomeInteger", "()I", "GetGetSomeIntegerHandler")]
[Register ("getSomeInteger", "()I", "")]
get {
const string __id = "getSomeInteger.()I";
try {
Expand All @@ -42,7 +42,7 @@ public static unsafe int SomeInteger {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeInteger' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("setSomeInteger", "(I)V", "GetSetSomeInteger_IHandler")]
[Register ("setSomeInteger", "(I)V", "")]
set {
const string __id = "setSomeInteger.(I)V";
try {
Expand All @@ -56,7 +56,7 @@ public static unsafe int SomeInteger {

public static unsafe string SomeString {
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeString' and count(parameter)=0]"
[Register ("getSomeString", "()Ljava/lang/String;", "GetGetSomeStringHandler")]
[Register ("getSomeString", "()Ljava/lang/String;", "")]
get {
const string __id = "getSomeString.()Ljava/lang/String;";
try {
Expand All @@ -66,7 +66,7 @@ public static unsafe string SomeString {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeString' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
[Register ("setSomeString", "(Ljava/lang/String;)V", "GetSetSomeString_Ljava_lang_String_Handler")]
[Register ("setSomeString", "(Ljava/lang/String;)V", "")]
set {
const string __id = "setSomeString.(Ljava/lang/String;)V";
IntPtr native_value = JNIEnv.NewString (value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected SomeObject (IntPtr javaReference, JniHandleOwnership transfer) : base
static IntPtr id_setSomeInteger_I;
public static unsafe int SomeInteger {
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeInteger' and count(parameter)=0]"
[Register ("getSomeInteger", "()I", "GetGetSomeIntegerHandler")]
[Register ("getSomeInteger", "()I", "")]
get {
if (id_getSomeInteger == IntPtr.Zero)
id_getSomeInteger = JNIEnv.GetStaticMethodID (class_ref, "getSomeInteger", "()I");
Expand All @@ -39,7 +39,7 @@ public static unsafe int SomeInteger {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeInteger' and count(parameter)=1 and parameter[1][@type='int']]"
[Register ("setSomeInteger", "(I)V", "GetSetSomeInteger_IHandler")]
[Register ("setSomeInteger", "(I)V", "")]
set {
if (id_setSomeInteger_I == IntPtr.Zero)
id_setSomeInteger_I = JNIEnv.GetStaticMethodID (class_ref, "setSomeInteger", "(I)V");
Expand All @@ -56,7 +56,7 @@ public static unsafe int SomeInteger {
static IntPtr id_setSomeString_Ljava_lang_String_;
public static unsafe string SomeString {
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='getSomeString' and count(parameter)=0]"
[Register ("getSomeString", "()Ljava/lang/String;", "GetGetSomeStringHandler")]
[Register ("getSomeString", "()Ljava/lang/String;", "")]
get {
if (id_getSomeString == IntPtr.Zero)
id_getSomeString = JNIEnv.GetStaticMethodID (class_ref, "getSomeString", "()Ljava/lang/String;");
Expand All @@ -66,7 +66,7 @@ public static unsafe string SomeString {
}
}
// Metadata.xml XPath method reference: path="/api/package[@name='xamarin.test']/class[@name='SomeObject']/method[@name='setSomeString' and count(parameter)=1 and parameter[1][@type='java.lang.String']]"
[Register ("setSomeString", "(Ljava/lang/String;)V", "GetSetSomeString_Ljava_lang_String_Handler")]
[Register ("setSomeString", "(Ljava/lang/String;)V", "")]
set {
if (id_setSomeString_Ljava_lang_String_ == IntPtr.Zero)
id_setSomeString_Ljava_lang_String_ = JNIEnv.GetStaticMethodID (class_ref, "setSomeString", "(Ljava/lang/String;)V");
Expand Down