Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes applied, to be regenerated #8

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
3 changes: 3 additions & 0 deletions src/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"javax.management.NotificationFilter"
],
"ClassesToAvoid": [
"android.R",
"android.widget.ArrayAdapter",
"java.lang.ProcessBuilder$Redirect$Type",
"java.lang.Thread$UncaughtExceptionHandler",
"java.util.Comparator",
Expand Down Expand Up @@ -65,6 +67,7 @@
"javax.tools.DiagnosticListener"
],
"NamespacesInConflict": [
"android.system",
"java.lang.module",
"java.awt.color",
"java.awt.desktop",
Expand Down
5 changes: 1 addition & 4 deletions src/net/Common/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(NETDROID_DOCKER_BUILD_ACTIONS)' != 'true'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TargetFrameworks>net462;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(NETDROID_DOCKER_BUILD_ACTIONS)' == 'true'">
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
Expand All @@ -35,9 +35,6 @@
<None Include="..\Common\JCOB128x128.png" Pack="true" PackagePath="" />
<None Include="..\Common\Netdroid.snk" Link="Netdroid.snk" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<!-- Fix start https://github.com/dotnet/sourcelink/issues/572 -->
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
Expand Down
33 changes: 33 additions & 0 deletions src/net/Netdroid/Developed/Java/Lang/AbstractMethodError.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;

namespace Java.Lang
{
/// <summary>
/// .NET implementations of <see href="https://docs.oracle.com/javase/8/docs/api/java/lang/AbstractMethodError.html"/>
/// </summary>
public class AbstractMethodError : IncompatibleClassChangeError
{
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeException_BridgeClassName.htm"/>
/// </summary>
public override string BridgeClassName => "java.lang.AbstractMethodError";
}
}
33 changes: 33 additions & 0 deletions src/net/Netdroid/Developed/Java/Lang/ArithmeticException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;

namespace Java.Lang
{
/// <summary>
/// .NET implementations of <see href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArithmeticException.html"/>
/// </summary>
public class ArithmeticException : JVMBridgeException<ArithmeticException>
{
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeException_BridgeClassName.htm"/>
/// </summary>
public override string BridgeClassName => "java.lang.ArithmeticException";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;

namespace Java.Lang
{
/// <summary>
/// .NET implementations of <see href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html"/>
/// </summary>
public class ArrayIndexOutOfBoundsException : JVMBridgeException<ArrayIndexOutOfBoundsException>
{
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeException_BridgeClassName.htm"/>
/// </summary>
public override string BridgeClassName => "java.lang.ArrayIndexOutOfBoundsException";
}
}
33 changes: 33 additions & 0 deletions src/net/Netdroid/Developed/Java/Lang/ArrayStoreException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;

namespace Java.Lang
{
/// <summary>
/// .NET implementations of <see href="https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayStoreException.html"/>
/// </summary>
public class ArrayStoreException : JVMBridgeException<ArrayStoreException>
{
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeException_BridgeClassName.htm"/>
/// </summary>
public override string BridgeClassName => "java.lang.ArrayStoreException";
}
}
33 changes: 33 additions & 0 deletions src/net/Netdroid/Developed/Java/Lang/AssertionError.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;

namespace Java.Lang
{
/// <summary>
/// .NET implementations of <see href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html"/>
/// </summary>
public class AssertionError : Error
{
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeException_BridgeClassName.htm"/>
/// </summary>
public override string BridgeClassName => "java.lang.AssertionError";
}
}
58 changes: 58 additions & 0 deletions src/net/Netdroid/Developed/Java/Lang/Boolean.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;
using MASES.JNet.Specific.Extensions;
using System;

namespace Java.Lang
{
public partial class Boolean : INativeConvertible<Boolean, bool>
{
bool INativeConvertible<Boolean, bool>.ToCLR()
{
return BooleanValue();
}
/// <summary>
/// Returns the <see cref="Boolean"/> from the <paramref name="clrValue"/> instance
/// </summary>
/// <param name="clrValue">The <see cref="bool"/> of CLR</param>
/// <returns>The converted <see cref="Boolean"/></returns>
public static Boolean ToJVM(bool clrValue)
{
return ValueOf(clrValue);
}

/// <summary>
/// Converter from <see cref="Boolean"/> to <see cref="bool"/>
/// </summary>
public static implicit operator bool(Boolean b) => b != null ? b.BooleanValue() : default;
/// <summary>
/// Converter from <see cref="Boolean"/> to <see cref="Nullable{Boolean}"/>
/// </summary>
public static implicit operator bool?(Boolean b) => b != null ? b.BooleanValue() : null;
/// <summary>
/// Converter from <see cref="bool"/> to <see cref="Boolean"/>
/// </summary>
public static implicit operator Boolean(bool b) => ValueOf(b);
/// <summary>
/// Converter from <see cref="Nullable{Boolean}"/> to <see cref="Boolean"/>
/// </summary>
public static implicit operator Boolean(bool? b) => b.HasValue ? ValueOf(b.Value) : null;
}
}
33 changes: 33 additions & 0 deletions src/net/Netdroid/Developed/Java/Lang/BootstrapMethodError.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;

namespace Java.Lang
{
/// <summary>
/// .NET implementations of <see href="https://docs.oracle.com/javase/8/docs/api/java/lang/BootstrapMethodError.html"/>
/// </summary>
public class BootstrapMethodError : LinkageError
{
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeException_BridgeClassName.htm"/>
/// </summary>
public override string BridgeClassName => "java.lang.BootstrapMethodError";
}
}
58 changes: 58 additions & 0 deletions src/net/Netdroid/Developed/Java/Lang/Byte.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

using MASES.JCOBridge.C2JBridge;
using MASES.JNet.Specific.Extensions;
using System;

namespace Java.Lang
{
public partial class Byte : INativeConvertible<Byte, byte>
{
byte INativeConvertible<Byte, byte>.ToCLR()
{
return ByteValue();
}
/// <summary>
/// Returns the <see cref="Byte"/> from the <paramref name="clrValue"/> instance
/// </summary>
/// <param name="clrValue">The <see cref="byte"/> of CLR</param>
/// <returns>The converted <see cref="Byte"/></returns>
public static Byte ToJVM(byte clrValue)
{
return ValueOf(clrValue);
}

/// <summary>
/// Converter from <see cref="Byte"/> to <see cref="byte"/>
/// </summary>
public static implicit operator byte(Byte b) => b != null ? b.ByteValue() : default;
/// <summary>
/// Converter from <see cref="Byte"/> to <see cref="Nullable{Byte}"/>
/// </summary>
public static implicit operator byte?(Byte b) => b != null ? b.ByteValue() : null;
/// <summary>
/// Converter from <see cref="byte"/> to <see cref="Byte"/>
/// </summary>
public static implicit operator Byte(byte b) => ValueOf(b);
/// <summary>
/// Converter from <see cref="Nullable{Byte}"/> to <see cref="Byte"/>
/// </summary>
public static implicit operator Byte(byte? b) => b.HasValue ? ValueOf(b.Value) : null;
}
}
Loading
Loading