greentube / java-converter Goto Github PK
View Code? Open in Web Editor NEWA java-to-javascript and java-to-C# source to source compiler.
License: MIT License
A java-to-javascript and java-to-C# source to source compiler.
License: MIT License
In java it is permitted to declare an abstract class to implement some interface without declaring the interface methods. All those methods are automatically considered to be abstract methods.
In C# this is not allowed and everything needs to be explicitly specified.
Proposed solution: Add those abstract method declarations.
Invoking inner class constructor from method belonging to second inner class does not convert correctly to C#.
Java:
public class A
{
public class B
{
}
public class C
{
B b;
C()
{
b = new B();
}
}
}
C# conversion of class C:
public class A_0024C: object
{
public A _o;
public A_0024B b_f;
public A_0024C(A _o):base()
{
this._o = _o;
this.b_f = new A_0024B(this);
}
}
That is, C invokes constructor of B replacing A with itself.
Hi there!
With -allowlong option active, the following Java code:
public class Foo
{
public long bar(int n)
{
return 1L << n;
}
}
is converted to C#:
public class Foo: object
{
public Foo():base()
{
}
public virtual long bar(int n)
{
return 1 << n;
}
}
That is, constant expression '1L' is converted to expression '1'.
Please fix! :)
There are certain cases, where auto-unboxing is not detected by the converter and subsequently non-functioning code is generated (but which is compileable in C#).
example: char c = (char) v.elementAt(0); // v is Vector
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.