Comments (1)
class TC {
public TC() {}
public bool TCtest1(out string modifiedUrlString, string urlString){
modifiedUrlString = urlString.ToUpper();
return false;
}
public bool TCtest2(out string user, out string passwd, string urlString){
user = urlString.ToUpper();
passwd = urlString.ToLower();
return true;
}
public void TCtest(string urlString)
{
string modifiedUrlString=null;
string engineAuthUser=null;
string engineAuthPassword=null;
if (TCtest1(out modifiedUrlString, urlString))
{
System.Console.WriteLine(modifiedUrlString);
}
else if (TCtest2(out engineAuthUser, out engineAuthPassword, urlString))
{
if (!String.IsNullOrEmpty(engineAuthUser) && !String.IsNullOrEmpty(engineAuthPassword))
{
System.Console.WriteLine(engineAuthUser + engineAuthPassword);
}
else
{
System.Console.WriteLine("Null or Null");
}
}
else
{
System.Console.WriteLine("They really didn't like us");
}
}
public void TCtest_workaround(string urlString)
{
string modifiedUrlString=null;
string engineAuthUser=null;
string engineAuthPassword=null;
bool optTCTest1 = TCtest1(out modifiedUrlString, urlString);
if (optTCTest1)
{
System.Console.WriteLine(modifiedUrlString);
}
else {
bool optTCTest2 = TCtest2(out engineAuthUser, out engineAuthPassword, urlString);
if (optTCTest2)
{
if (!String.IsNullOrEmpty(engineAuthUser) && !String.IsNullOrEmpty(engineAuthPassword))
{
System.Console.WriteLine(engineAuthUser + engineAuthPassword);
}
else
{
System.Console.WriteLine("Null or Null");
}
}
else
{
System.Console.WriteLine("They really didn't like us");
}
}
}
gives
//
package Tester.RefOut;
import CS2JNet.JavaSupport.language.RefSupport;
import CS2JNet.System.StringSupport;
public class TC
{
public TC() throws Exception {
}
public boolean tCtest1(RefSupport<String> modifiedUrlString, String urlString) throws Exception {
modifiedUrlString.setValue(urlString.toUpperCase());
return false;
}
public boolean tCtest2(RefSupport<String> user, RefSupport<String> passwd, String urlString) throws Exception {
user.setValue(urlString.toUpperCase());
passwd.setValue(urlString.toLowerCase());
return true;
}
public void tCtest(String urlString) throws Exception {
String modifiedUrlString = null;
String engineAuthUser = null;
String engineAuthPassword = null;
boolean boolVar___0 = tCtest1(refVar___0,urlString);
if (boolVar___0)
{
System.out.println(modifiedUrlString);
}
else
{
RefSupport<String> refVar___0 = new RefSupport<String>();
RefSupport<String> refVar___1 = new RefSupport<String>();
RefSupport<String> refVar___2 = new RefSupport<String>();
boolean boolVar___1 = tCtest2(refVar___1,refVar___2,urlString);
modifiedUrlString = refVar___0.getValue();
engineAuthUser = refVar___1.getValue();
engineAuthPassword = refVar___2.getValue();
if (boolVar___1)
{
if (!StringSupport.isNullOrEmpty(engineAuthUser) && !StringSupport.isNullOrEmpty(engineAuthPassword))
{
System.out.println(engineAuthUser + engineAuthPassword);
}
else
{
System.out.println("Null or Null");
}
}
else
{
System.out.println("They really didn't like us");
}
}
}
public void tCtest_workaround(String urlString) throws Exception {
String modifiedUrlString = null;
String engineAuthUser = null;
String engineAuthPassword = null;
RefSupport<String> refVar___3 = new RefSupport<String>();
boolean optTCTest1 = tCtest1(refVar___3,urlString);
modifiedUrlString = refVar___3.getValue();
if (optTCTest1)
{
System.out.println(modifiedUrlString);
}
else
{
RefSupport<String> refVar___4 = new RefSupport<String>();
RefSupport<String> refVar___5 = new RefSupport<String>();
boolean optTCTest2 = tCtest2(refVar___4,refVar___5,urlString);
engineAuthUser = refVar___4.getValue();
engineAuthPassword = refVar___5.getValue();
if (optTCTest2)
{
if (!StringSupport.isNullOrEmpty(engineAuthUser) && !StringSupport.isNullOrEmpty(engineAuthPassword))
{
System.out.println(engineAuthUser + engineAuthPassword);
}
else
{
System.out.println("Null or Null");
}
}
else
{
System.out.println("They really didn't like us");
}
}
}
}
from cs2j.
Related Issues (20)
- ArrayList (Collection) constructor translation
- override -> @override
- sort
- regex
- cloning objects HOT 1
- support java naming convenions HOT 1
- bad comment placement
- Add Warnings if we generate methods with same name as existing methods
- Add warnings where new modifier is used.
- parser fails if <EOF> is on commented line HOT 1
- enum initializers are not in ascending order
- can't write a constructor for KeyValuePair
- make enums option is broken
- cs2j enters an infinite loop when processing this class HOT 2
- Not able to compile the code HOT 1
- CS2J execution error HOT 1
- Exception when run mkit.bat HOT 3
- Doesn't support newer C#
- System.FormatException: Input string was not in a correct format. HOT 1
- Indexers in Explicit Interface Implementation declarations are throwing translation exceptions and prevent file translation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs2j.